Question: Task 2 : Add your name, date, and program summary ( synopsis ) to the comments at the top of the code skeleton. Task 3
Task :
Add your name, date, and program summary synopsis to the comments at the top of the code skeleton.
Task :
Prompt the user to input five pairs of numbers: A player's jersey number and the player's rating Store the jersey numbers in one vector and the ratings in another vector. Do not prompt for roster information in the main function. Rather, create a new function that is called from main to add the information to both vectors.
Ex:
Enter player s jersey number: Enter player s rating: Enter player s jersey number: Enter player s rating: Enter player s jersey number: Enter player s rating: Enter player s jersey number: Enter player s rating: Enter player s jersey number: Enter player s rating:
After you finish this task, your program should be able to pass test case #
Task :
Write a function to output the roster by printing the corresponding player jersey number and rating from each vector. Call this function from the main function.
Ex:
ROSTER Player Jersey number: Rating: Player Jersey number: Rating: Player Jersey number: Rating: Player Jersey number: Rating: Player Jersey number: Rating:
After you finish this task, your program should pass test case #
Task :
In the main function, implement a menu of options for a coach to view or modify the roster. Each option is represented by a single character. The main function initially outputs the menu, and prompts the coach for a choice. After the choice is processed, the main function outputs the menu again and prompts the coach for the next choice. The program ends when the user chooses the option to Quit. Use a dowhile loop to implement this menu. Your program does not need to validate any data. For this task, only implement the Quit option.
Ex:
MENU a Add player d Remove player u Update player rating r Output players above a rating o Output roster q Quit Choose an option: q Program ends.
After you finish this task, your program should pass test case #
Task :
Implement the "Output roster" menu option. When the coach selects this option, the main function should call the function that you created earlier to print out the roster. Once this task is completed, your program should be able to pass test case #
Task :
Implement the "Add player" menu option. If the coach selects this option, the main calls another function to prompt the user for a new player's jersey number and rating.
Enter a new player's jersey number: Enter the player's rating:
That other function appends the values to the two vectors. Once this task is complete, your program should be able to pass test case #
Task :
Implement the "Remove player" menu option. If the coach selects this option, the main function calls another function to prompt the user for a player's jersey number.
Enter a jersey number:
That other function removes the player from the roster delete the jersey number and rating Once this task is complete, your program should be able to pass test case #
Task :
Implement the "Update player rating" menu option. If the coach selects this option, the main function calls another function to prompt the user for a player's jersey number and new rating.
Enter a jersey number: Enter a new rating for player:
Then that function changes that player's rating. You do not need to validate any data. Once this task is complete, your program should be able to pass test case #
Task :
Implement the "Output players above a rating" menu option. The main function calls another function to prompt the coach for a rating.
Enter a rating:
That other function then prints the jersey number and rating for all players with ratings above the entered value. You can that there will always be at least on player above the requested rating. Once this test is complete, your program should be able to pass all tests.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
