(Solved) : 519 Lab 11b Soccer Team Roster Instructor Note Note Unlike Assignments One Two Programs Pe Q37065012 . . .





5.19 Lab 11b: Soccer team roster Instructor note: NOTE Unlike our other assignments, this one has only two programs: People’s Weights and this one. To earn 30 points, you must do both assignments. Allow ample time to complete them Passing arrays to methods Review Chapter 6.8 Array Parameters if you wish to use methods in your program (a good idea). Since we pass a reference to the array’s location in memory, changes made to the array within the method will persist when the method completes. 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 in one int array and the ratings in another int array Output these arrays (i.e., output the roster). (4 pts) Ex Enter playcr 1’s jorscy number: 84 Enter player 1’s rating: EX. Enter player 1’s jorscy number: Enter player l’s rating: Enter player 2’s jersey number: 2.3 Entor playr 2’s rating: Enter player 3’s jersey number: nter player 3’s rating: Enter player ‘s jersey number: 30 Enter player 4’s rating: Enter player 5’s jersey number: Enter playcr 5’s rating: ROSTER Player 1Jersey number: 84, RaLing:7 2 3 ROSTER Player 1 erscy number: 84, Rating: 7 Player 2 -Jersey number: 23, Rating: 4 (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 outputs the menu after a user chooses an option. The program ends when the user chooses the option to Quit. For this step, the other options do nothing. (4 pt) Ex: MENU u – Update player rating a -Oulpul players above a raLing r- Replace player OuLpul rosler T – Quit Choosc an option: (3) Implement the “Output roster menu option. (2 pt) Ex: Player 1–Jersey number: 4, Rating: Player2 -dersey number: 23, Rat.ing: 4 4) 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. (3 pt) Ex: Enter a jersey number: 23 Enter a new rating tor player: (5) 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. (5 pts) Ex Enl.er a ral.ing: ABOVE 5 Player 1Jersey number: 84, Ral.ing: 7 (6) Implement the ‘Replace player menu option. Prompt the user for the jersey number of the player to replace. If the player is in the roster, then prompt again for a new jersey number and rating. Update the replaced player’s jersey number and rating. (4 pts) Ex Enl.er a jersey number: Jersey number: 84-Rating:ー7 (6) Implement the “Replace player” menu option. Prompt the user for the jersey number of the player to replace. If the player is in the roster then prompt again for a new jersey number and rating. Update the replaced player’s jersey number and rating. (4 pts) Ex Enter a jersey number: Enter a new jersey number: 12 Enter a rating for the new player: LAB ACTIVITY 5.19.1: Lab 11b: Soccer team roster 0/ 20 PlayerRoster.java Load default template 1 import java.util.Scanner 3 public class PlayerRoster 4 public static void main(String[] args) *Type your code here. Show transcribed image text
Expert Answer
Answer to 519 Lab 11b Soccer Team Roster Instructor Note Note Unlike Assignments One Two Programs Pe Q37065012 . . .
OR