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 10:50
Write a 3-4 page apa formatted paper comparing your organization’s it strategy with the best practices outlined in your course text. content should include, but not be limited to: developing and delivering on the it value, developing it strategy for the business value and linking it to business metrics. your paper should include an abstract and a conclusion and a reference page with 3-5 references
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
Ihave an iphone 8plus should i get another phone like samsung note 9 or s9 ? ?
Answers: 2
question
Computers and Technology, 22.06.2019 19:10
10. when you create a pivottable, you need to specify where to find the data for the pivottable. is it true
Answers: 2
question
Computers and Technology, 23.06.2019 06:00
How can a user delete a drawing object
Answers: 1
You know the right answer?
This program will store roster and rating information for a soccer team. coaches rate players during...
Questions
Questions on the website: 13722360