Question: NEED HELP BAD FOR THIS LAB!!!! We've only convered #include ,iostream,string, and cmath 1. You must use a vector to store all of the player

NEED HELP BAD FOR THIS LAB!!!!

We've only convered #include ,iostream,string, and cmath

1. You must use a vector to store all of the player names. All player names will be a single name.

2. You must use another vector to store the total score for each player. You must calculate the total score for each player after all rolls have been entered.

3. You must use an array to store each roll's value.

4. The number of rolls is variable depending on whether the player threw a strike (knocked down 10 pins in one roll), spare, or neither. Please see "Scoring Bowling" below.

5. You must use a for loop to input the roll values into the array.

6. If the user types "done" before entering any names, output "No players were entered."

7. In the event of a tie, the first player to obtain the best or worst score should be printed.

8. You can assume that the user will input valid scores. You do not need to perform error checking for invalid input.

 NEED HELP BAD FOR THIS LAB!!!! We've only convered #include ,iostream,string,

and cmath 1. You must use a vector to store all of

Enter player's name (done for no more players): John Enter score for frame 1, roLL 1: 10 Enter score for frame 2, roll 1: 10 Enter score for frame 3, roll 1: 10 Enter score for frame 4, roll 1: 10 Enter score for frame 5, roll 1: 10 Enter score for frame 6, roll 1: 10 Enter score for frame 7, roll 1: 10 Enter score for frame 8, roll 1: 10 Enter score for frame 9, roll 1: 10 Enter score for frame 10, roll 1: 10 Enter score for frame 10, roll 2: 10 Enter score for frame 10, roll 3: 10 Enter player's name (done for no more players): Cheryl Enter score for frame 1, roll 1: 8 Enter score for frame 1, roll 2: 1 Enter score for frame 2, roll 1: 0 Enter score for frame 2, roll 2: 9 Enter score for frame 3, roll 1: 2 Enter score for frame 3, roll 2: 8 Enter score for frame 4, roll 1: 10 Enter score for frame 5, roll 1: 6 Enter score for frame 5, roll 2: 3 Enter score for frame 6, roll 1: 7 Enter score for frame 6, roll 2: 0 Enter score for frame 7, roll 1: 5 Enter score for frame 7, roll 2: 2 Enter score for frame 8, roll 1: 10 Enter score for frame 9, roll 1: 0 Enter score for frame 9, roll 2: 6 Enter score for frame 10, roll 1: 2 Enter score for frame 10, roll 2: 8 Enter score for frame 10, roll 3: 10 Enter player's name (done for no more players): done John scored 300 Cheryl scored 122 Cheryl did the worst by scoring 122. John won the game by scoring 300 Enter player's name (done for no more players): done No players were entered

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!