subject

This program will store roster and rating information for a soccer team. coaches rate players during tryouts to ensure a 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 and the ratings in a dictionary. output the dictionary's elements with the jersey numbers in ascending order (i. e., output the roster from smallest to largest jersey number). be careful with this and later parts of the problem to get the blank lines between blocks of interaction to print exactly the way shown in the expected output, since white space counts this time. also, any output in later parts of the problem must also be sorted with the jersey numbers in ascending order. hint: dictionaries cannot be sorted but dictionary keys can be stored in a sorted list. (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:

4

enter player 3's jersey number:

4

enter player 3's rating:

5

enter player 4's jersey number:

30

enter player 4's rating:

2

enter player 5's jersey number:

66

enter player 5's rating:

9

roster

jersey number: 4, rating: 5

jersey number: 23, rating: 4

jersey number 30, rating: 2



(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 the option prompt, and then outputs the menu and the option prompt each time the user chooses an option and its execution finishes, i. e. the user provides the option's input, if any, and the program prints the option's output, if any. the program ends when the user chooses the option to quit. for this step, the other options do nothing. (2 pts)

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:
(3) implement the "output roster" menu option, printing the players in the order of their jersey numbers, as in part (1) above. (1 pt)

ex:

roster

jersey number: 4, rating: 5

jersey number: 23, rating: 4

jersey number 30, rating: 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)

ex:

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). (1 pt)

ex:

enter a jersey number:

4

(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, again in ascending order of jersey number.. (2 pts)

ex:

enter a rating:
5
above 5
jersey number: 66, rating: 9
jersey number: 84, rating: 7

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:30
Technician a says that a dry sump system uses no oil storage sump under the engine. technician b says that a wet sump system uses no oil storage sump under the engine. who is correct?
Answers: 3
question
Computers and Technology, 23.06.2019 07:00
What are three software programs for mobile computing?
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
Ahousehold consists of a married couple and their twin five-year old daughters. the couples children had no income and lived with their parents all of last year. how many exemptions can the couple claim on last years tax return or they file with the “ married filing jointly “ status? a. 4 b. 5 c. 3 d. 2
Answers: 1
question
Computers and Technology, 24.06.2019 17:30
Looking at the electroscope, describe how you can cause the two leaves at the bottom to repel each other and stay that way
Answers: 3
You know the right answer?
This program will store roster and rating information for a soccer team. coaches rate players during...
Questions
question
English, 01.04.2021 14:00
question
Mathematics, 01.04.2021 14:00
question
Biology, 01.04.2021 14:00
question
Mathematics, 01.04.2021 14:00
question
Physics, 01.04.2021 14:00
Questions on the website: 13722361