help with C++

5.27 LAB* Program: Soccer team roster (Vectors) This program will store roster and rating information for a soccer team. Coac(2) Implement a menu of options for a user to modify the roster. Each option is represented by a single character. The progra(6) Implement the Update player rating menu option. Prompt the user for a players jersey number. Prompt again for a new rat

OUTPUT:

TEST1

Output differs. See highlights below. Special character legend 84 7 23 4 4 5 Input 30 2 66 9 Enter player 1s jersey number:

TEST 2

2: Compare output 0 Output differs. See highlights below. Special character legend 1 4 6 9 21 5 Input 47 8 83 2 Enter player

TEST 3

3: Compare output Output is nearly corect, but whitespace differs. See highlights below. Special character legend 84 7 23 4 4

Enter player 1s jersey number:. Enter player 1s rating: Enter player 2s jersey number: Enter player 2s rating: Enter play

TEST 4

4: Compare output Special character legend Output differs. See highlights below. 84 7 23 4 4 5 Input 30 2 66 9

ROSTER Player 1 Jersey number: 84, Rating: 7 Player 2 -- Jersey number: 23, Rating: 4 Player 3 Jersey number: 4, Rating: 5 Pl

TEST 5

5: Compare output ^ Output differs. See highlights below. Special character legend 84 7 23 4 4 5 30 2 Input 66 9 a. 55 6

Enter a new players jersey number: Enter the players rating MENU Add player a - Remove player d- Update player rating 11 Ou

TEST 6

6: Compare outputA Output differs. See highlights below. Special cha 84 7 23 4 4 5 30 2 Input 66 9 d 30

ROSTER Player 1 -- Jersey number: 84, Rating: 7 Player 2 Jersey number: 23, Rating: 4 Player 3 Jersey number: 4, Rating: 5 Pl

TEST 7

7: Compare output Output differs. See highlights below. Special character legend 1 4 6 9 21 5 47 8 83 2 Input di 21 C

ROSTER Jersey number: 1, Rating: 4 Player 1 Player 2 Jersey number: 6, Rating: 9 Player 3 -- Jersey number: 47, Rating: 8 Pla

TEST 8

8 Compare ouiput Output differs. See highlights below. Special character legend 84 7 23 4 4 5 30 2 66 9 Input u 4 st LO O

ROSTER Player 1 Jersey number: 84, Rating: 7 Player 2 Jersey number: 23, Rating: 4 Player 3 Jersey number: 4, Rating: 6 Playe

TEST 9

9: Compare output Output differs. See highlights below. Special character legend 84 7 23 4 4 5 30 2 Input 66 9 4 ABOVE 4 Play

TEST 10

10: Compare output A Output differs. See highlights below. Special character legend 1 4 6 9 21 5 47 8 Input 83 2 8 ABOVE 8 Pl

5.27 LAB* Program: Soccer team roster (Vectors) This program will store roster and rating information for a soccer team. Coaches rate players during tryouts to ensure balanced team. (1) Prompt the user to input five pairs of numbers: A player’s jersey number (0-99) and the player’s rating (1-9). Store the jersey numbers in one int vector and the ratings in another int vector. Output these vectors (i.e., output the roster). (3 pts) Ex Enter player 1’s jersey number: 84 Enter player 1’s rating: 7 Enter player 2’s jersey number: 23 Enter player 2’s rating: Enter player 3’s jersey number: Enter player 3’s rating: 5 Enter player 4’s jersey number: 30 Enter player 4’s rating: Enter player 5’s jersey number: 66 Enter player 5’s rating: ROSTER Player 1 — Jersey number: 84, Rating: 7 Player 2 – Jersey number: 23, Rating: 4 (2) Implement a menu of options for a user to modify the roster. Each option is represented by a single character. The program initially outputs the menu, and outputs the menu after a user chooses an option. The program ends when the user chooses the option to Quit. For this step, the other options do nothing. (2 pts) Ex: MENU Add player d Remove player – Update player rating 11 Output players above a rating r – Output roster C Quit Choose an option: (3) Implement the “Output roster” menu option. (1 pt) Ex ROSTER Player 1 — Jersey number: 84, Rating: 7 Jersey number: 23, Rating: 4 Player 2 -_ (4) Implement the “Add player menu option. Prompt the user for a new player’s jersey number and rating. Append the values to the two vectors. (1 pt) Fx Enter a new player’s jersey number: 49 Enter the player’s rating: 8 (5) Implement the “Delete player” menu option. Prompt the user for a player’s jersey number. Remove the player from the roster (delete the jersey number and rating). (2 pts) (6) Implement the “Update player rating menu option. Prompt the user for a player’s jersey number. Prompt again for a new rating for the player, and then change that player’s rating. (1 pt) Ex: Enter a jersey number: 23 Enter a new rating for player: 6 (7) Implement the “Output players above a rating menu option. Prompt the user for a rating. Print the jersey number and rating for all players with ratings above the entered value. (2 pts) Ex: Enter a rating: 5 ABOVE 5 Player 1 — Jersey number: 84, Rating: 7 Output differs. See highlights below. Special character legend 84 7 23 4 4 5 Input 30 2 66 9 Enter player 1’s jersey number: Enter player 1’s rating: Enter player 2’s jersey number: Enter player 2’s rating: Enter player 3’s jersey number Enter player 3’s rating: Enter player 4’s jersey number: Enter player 4’s rating: Expected output starts with Enter player 5’s jersey number: Enter player 5’s rating: ROSTER Player 1 Jersey number: 84, Rating: 7 – Player 2 — Jersey number: 23, Rating: 4 Player 3 Jersey number: 4, Rating: 5 Player 4 Jersey number: 30, Rating: 2 Player 5 Jersey number: 66, Rating: 9 2: Compare output 0 Output differs. See highlights below. Special character legend 1 4 6 9 21 5 Input 47 8 83 2 Enter player 1’s jersey number: Enter player 1’s rating: Enter player 2’s jersey number: Enter player 2’s rating: Enter player 3’s jersey number: Enter player 3’s rating: Enter player 4’s jersey number: Expected output Enter player 4’s rating: starts with Enter player 5’s jersey number: Enter player 5’s rating: ROSTER Player 1 Jersey number: 1, Rating: 4 Player 2 – Jersey number: 6, Rating: 9 Player 3 – Jersey number: 21, Rating: 5 Plaver 4– Jersey number: 47, Rating: 8 Player 5 Jersey number: 83, Rating: 2 3: Compare output Output is nearly corect, but whitespace differs. See highlights below. Special character legend 84 7 23 4 4 5 Input 30 2 66 9 Enter player 1’s jersey number:. Enter player 1’s rating: Enter player 2’s jersey number: Enter player 2’s rating: Enter player 3’s jersey number: Enter player 3’s rating: Enter player 4’s jersey number: Enter player 4’s rating: Enter player 5’s jersey number: Enter player 5’s rating: Expected output ROSTER Player 1 Jersey number: 84, Rating: 7 Player 2 Jersey number: 23, Rating: 4 Player 3 Jersey number: 4, Rating: 5 Player 4 — Jersey number: 30, Rating: 2 Player 5 Jersey number: 66, Rating: 9 MENU Add player a- Remove player d Update player rating u Output players above a rating Output roster C Quit Choose an option: 5 4: Compare output Special character legend Output differs. See highlights below. 84 7 23 4 4 5 Input 30 2 66 9 ROSTER Player 1 Jersey number: 84, Rating: 7 Player 2 — Jersey number: 23, Rating: 4 Player 3 Jersey number: 4, Rating: 5 Player 4 Jersey number: 30, Rating: 2 Player 5 Jersey number: 66, Rating: 9 Expected output ends with MENU Add player a – d Remove player Update player rating 11 – Output players above a rating Output roster O- Quit а – Choose an option: 5: Compare output ^ Output differs. See highlights below. Special character legend 84 7 23 4 4 5 30 2 Input 66 9 a. 55 6 Enter a new player’s jersey number: Enter the player’s rating MENU Add player a – Remove player d- Update player rating 11 Output players above a rating r- Output roster Quit Choose an option: ROSTER Player 1 Jersey number: 84, Rating: 7 Expected output Player 2 Jersey number: 23, Rating: 4 ends with Jersey number: 4, Rating: 5 Player 3 – Player 4 Jersey number: 30, Rating: 2 Player 5 Jersey number: 66, Rating: 9 Player 6 Jersey number: 55, Rating: 6 MENU Add player a – Remove player d Update player rating Output players above a rating r – Output roster Quit Choose an option: HOb HO 6: Compare outputA Output differs. See highlights below. Special cha 84 7 23 4 4 5 30 2 Input 66 9 d 30 ROSTER Player 1 — Jersey number: 84, Rating: 7 Player 2 Jersey number: 23, Rating: 4 Player 3 Jersey number: 4, Rating: 5 Player 4 Jersey number: 66, Rating: 9 MENU Expected output Add player a ends with d Remove player Update player rating u Output players above a rating Output roster Quit а – Choose an option: 7: Compare output Output differs. See highlights below. Special character legend 1 4 6 9 21 5 47 8 83 2 Input di 21 C ROSTER Jersey number: 1, Rating: 4 Player 1 Player 2 Jersey number: 6, Rating: 9 Player 3 — Jersey number: 47, Rating: 8 Player 4 Jersey number: 83, Rating: 2 MENU Expected output Add player d Remove player a. ends with Update player rating u Output players above a rating r – Output roster O- Quit Choose an option: 8 Compare ouiput Output differs. See highlights below. Special character legend 84 7 23 4 4 5 30 2 66 9 Input u 4 st LO O ROSTER Player 1 Jersey number: 84, Rating: 7 Player 2 Jersey number: 23, Rating: 4 Player 3 Jersey number: 4, Rating: 6 Player 4 Jersey number: 30, Rating: 2 Player 5 Jersey number: 66, Rating: 9 Expected output MENU ends with Add player a Remove player Update player rating 11 Output players above a rating Output roster O Quit Choose an option: 9: Compare output Output differs. See highlights below. Special character legend 84 7 23 4 4 5 30 2 Input 66 9 4 ABOVE 4 Player 1 Jersey number: 84, Rating: 7 Player 3 Jersey number: 4, Rating: 5 Player 5 — Jersey number: 66, Rating: 9 MENU a- Add player Your output ends with Remove player d Update player rating u Output players above a rating Output roster Quit Choose an option: ABOVE 4 Player 1 Jersey number: 84, Rating: 7 Player 3 — Jersey number: 4, Rating: 5 Player 5 Jersey number: 66, Rating: 9. MENU Expected output Add player a- ends with Remove player d. Update player rating u Output players above a rating r- Output roster Quit Choose an option: 10: Compare output A Output differs. See highlights below. Special character legend 1 4 6 9 21 5 47 8 Input 83 2 8 ABOVE 8 Player 2 Jersey number: 6, Rating: 9 MENU Add player a – d-Remove player Your output ends with Update player rating u rating Output players above a r Output roster Quit Choose an option: ABOVE 8 -Jersey number: 6, Rating: 9 Player 2 MENU Add player a – d-Remove player Expected output ends with Update player rating u Output players above a rating Output roster O- Quit Choose an option:



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *