this is java
import java.util.Scanner;public class PlayerRoster {public static void main(String[] args) {Scanner scnr = new Scanner(System.in);/* Type your code here. */}}
This program will store roster and rating information for asoccer team. Coaches rate players during tryouts to ensure abalanced 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 array and the ratings inanother int array. Output these arrays (i.e., output the roster).(5 pts)Ex:
Enter player 1's jersey number:84Enter player 1's rating:7Enter player 2's jersey number:23Enter player 2's rating:4Enter player 3's jersey number:4Enter player 3's rating:5Enter player 4's jersey number:30Enter player 4's rating:2Enter player 5's jersey number:66Enter player 5's rating:9ROSTERPlayer 1 -- Jersey number: 84, Rating: 7Player 2 -- Jersey number: 23, Rating: 4...
(2) Implement a menu of options for a user to modifythe roster. Each option is represented by a single character. Theprogram initially outputs the menu, and outputs the menu after auser chooses an option. The program ends when the user chooses theoption to Quit. For this step, the other options do nothing. (5pt)Ex:
MENUu - Update player ratinga - Output players above a ratingr - Replace playero - Output rosterq - QuitChoose an option:
(3) Implement the "Output roster" menu option. (5pt)Ex:
ROSTERPlayer 1 -- Jersey number: 84, Rating: 7Player 2 -- Jersey number: 23, Rating: 4...
(4) Implement the "Update player rating" menuoption. Prompt the user for a player's jersey number. Prompt againfor a new rating for the player, and then change that player'srating. (5 pt)Ex:
Enter a jersey number:23Enter a new rating for player:6...
(5) Implement the "Output players above a rating"menu option. Prompt the user for a rating. Print the jersey numberand rating for all players with ratings above the entered value. (5pts)Ex:
Enter a rating:5ABOVE 5Player 1 -- Jersey number: 84, Rating: 7...
(6) Implement the "Replace player" menu option.Prompt the user for the jersey number of the player to replace. Ifthe player is in the roster, then prompt again for a new jerseynumber and rating. Update the replaced player's jersey number andrating. (5 pts)Ex:
Enter a jersey number:4Enter a new jersey number:12Enter a rating for the new player:8
Rubric
Rubric - Soccer team roster
Rubric - Soccer team roster
Criteria
Ratings
Pts
This criterion is linked to a Learning OutcomeUser input
Prompt the user to input five pairs of numbers: A player'sjersey number (0 - 99) and the player's rating (1 - 9). Store thejersey numbers in one int array and the ratings in another intarray. Output these arrays (i.e., output the roster)
This criterion is linked to a Learning OutcomeMenu Options
Implement a menu of options for a user to modify the roster.Each option is represented by a single character. The programinitially outputs the menu, and outputs the menu after a userchooses an option. The program ends when the user chooses theoption to Quit. For this step, the other options do nothing
This criterion is linked to a Learning OutcomeImplement OutputRoster menu option
5 pts
This criterion is linked to a Learning OutcomeImplement Updateplayer rating menu option
This criterion is linked to a Learning OutcomeImplement Outputplayers above a rating menu option
This criterion is linked to a Learning OutcomeImplement Replaceplayer menu option
This criterion is linked to a Learning OutcomeComments
Block comments as well as line comments
This criterion is linked to a Learning OutcomeWhitespace
Good use of whitespace; not too much or not at all
this is java import java.util.Scanner; public class PlayerRoster { public static void main(String[] args) { Scanner scnr
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am