Question: This program will store roster and rating information for a soccer team. Coaches can add players to the roster, delete players from the roster, and

This program will store roster and rating information for a soccer team. Coaches can add players to the roster, delete players from the roster, and change the rating of a player.
(1) Your program will be a menu-driven, multiple function app. The coach can do multiple operations during a single execution of the app.
Each menu option is represented by a single character and a separate function. The menu appears again after any of the options besides quit is chosen and executes.
For this part implement only the quit option. So your program will start, create an empty vector object for the roster, display the menu, and end the program when the user enters quit. (1 pts)
Ex:
MENU a - Add player d - Remove player u - Update player rating o - Output roster q - Quit Choose an option: q
(3) Now implement the "Add player" menu option in a new function. Prompt the user for the new player's first name, last name, jersey number (0 to 99), and rating (1 to 9). Don't worry about error checking. Append the new player to roster vector. (2 pt)
Ex:
Enter the new player's data first name: JimmyJohn last name: Chang jersey number: 41 rating: 9
(4) Now Implement the "Output roster" menu option to give this format: (1 pt)
Ex:
ROSTER Player 1-- Tom Charles, jersey number 84, rating 7 Player 2-- Lauren Foucault, jersey number 23, rating 4...
(5) Implement the "Update player rating" menu option in a new function. 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. The app gives no status message. You can use the display roster option to see if the change was successful. (3 pt)
Ex:
Enter a jersey number: 23 Enter a new rating for player: 6
(6) Now implement the "Delete player" menu option in a new function. Prompt the user for a player's jersey number. Remove the player from the roster. The app gives no status message. You can use the display roster option to see if the delete was successful.
This one is harder than it reads. Use the at() and pop_back() vector class member functions to move every vector item after the item to delete up one position, and then get rid of the last item. (5 pts)
Ex:
Enter a jersey number: 4

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 Programming Questions!