100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Unit 4 - programming assignment 2 example distinction (contains C++ code snippets) £6.99   Add to cart

Essay

Unit 4 - programming assignment 2 example distinction (contains C++ code snippets)

8 reviews
 2840 views  41 purchases

NOTE! This document only contains 90% of the assignment. It is missing some small portion of Learning aim B. Also, this tournament system was made by one person so having things such as a record of the review and a document that demonstrates that you have shown individual responsibility and effecti...

[Show more]

Preview 2 out of 14  pages

  • March 16, 2021
  • 14
  • 2019/2020
  • Essay
  • Unknown
  • D
book image

Book Title:

Author(s):

  • Edition:
  • ISBN:
  • Edition:
All documents for this subject (91)

8  reviews

review-writer-avatar

By: adamojeta • 2 year ago

review-writer-avatar

By: itzmatty23 • 2 year ago

review-writer-avatar

By: mailrisc • 2 year ago

review-writer-avatar

By: wasdf • 2 year ago

this was not the work i was looking for and its definitely not a distinction level work

review-writer-avatar

By: abdulkaderjilanipatwary • 2 year ago

review-writer-avatar

By: neetikaigdtu • 2 year ago

review-writer-avatar

By: romarioellis • 2 year ago

Show more reviews  
avatar-seller
BpoBpo
Programming Assignment 2



Tournament event system



Make a dice roll function, that would determine team event pick que.

It will generate random values from 2 to 12 (two dices) for each team. It will bubble sort the teams
in an array to make a que for teams to choose events they want to participate in.

e.g. “Team 1 rolls 8”, “Team 2 rolls 9”, “Team 3 rolls 2”, “Team 4 rolls 12”

So, the team que according to the function will be:

1. Team 4
2. Team 2
3. Team 1
4. Team 3

Then, it will ask for the Team 4 (since it rolled the highest value) to choose 1 out of 5 events.

e.g. “Team 4, please choose 1 out of 5 possible events that you will be participating, by typing in
their number.”

*Displays the event*

“1. Event One 2. Event Two 3. Event Three 4. Event Four 5. Event Five”



After the team chooses the event, it will store the choice for the specific team.

Array that contains 4 place holders for the choices



When the events have been assigned to the teams, then each member in the teams will start taking
their part in the event.

e.g. “Team 1 started Event Three”

“Member 1 from Team 1 has scored 14 (random value)”

“Member 2 from Team 1 has scored 32 (random value)”

“Member 3 from Team 1 has scored 15 (random value)”

“Member 4 from Team 1 has scored 76 (random value)”

“Member 5 from Team 1 has scored 4 (random value)”

After the team finished their event, they it will calculate the total score and put it into the score
array. In the score array the score will be bubble sorted and the winners will be decided.

, 1. Output members of teams using for loops
2. If statements based on the chosen event
3. If statements will contain main formula for which the score will be calculated
4. The if statement has to be in the for loop

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller BpoBpo. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for £6.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

72042 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy revision notes and other study material for 14 years now

Start selling
£6.99  41x  sold
  • (8)
  Add to cart