100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Essay

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

Rating
3.6
(8)
Sold
41
Pages
14
Grade
D
Uploaded on
16-03-2021
Written in
2019/2020

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 effective self-management was not applicable. If the project would've been done by more than one person, then these would be required. This document contains a description of the tournament system, evaluation, code snippets for the tournament system that is needed for assignment 2, design (flowchart), optimization, and also test logs.

Show more Read less
Institution
Course









Whoops! We can’t load your doc right now. Try again or contact support.

Connected book

Written for

Study Level
Examinator
Subject
Unit

Document information

Uploaded on
March 16, 2021
Number of pages
14
Written in
2019/2020
Type
Essay
Professor(s)
Unknown
Grade
D

Subjects

Content preview

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
$9.63
Get access to the full document:
Purchased by 41 students

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached


Also available in package deal

Reviews from verified buyers

Showing 7 of 8 reviews
3 year ago

3 year ago

3 year ago

3 year ago

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

3 year ago

3 year ago

3 year ago

3.6

8 reviews

5
3
4
1
3
3
2
0
1
1
Trustworthy reviews on Stuvia

All reviews are made by real Stuvia users after verified purchases.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
BpoBpo University of Central Lancashire Preston
Follow You need to be logged in order to follow users or courses
Sold
309
Member since
5 year
Number of followers
250
Documents
78
Last sold
1 month ago

3.7

73 reviews

5
27
4
17
3
17
2
5
1
7

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions