JAVA You have just been hired as the General Manager of a Professional Sports Team (use whatever sport you like for this

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

JAVA You have just been hired as the General Manager of a Professional Sports Team (use whatever sport you like for this

Post by answerhappygod »

JAVA
You have just been hired as the General Manager of a Professional Sports Team (use whatever sport you like for this assignment).
A big part of being a General Manager is managing the players on the team and the salary cap. You are going to develop your own program to manage the roster and the salaries.
Use arrays to store the players last name and their corresponding salary.
Have the program read in a variable number of player's names and salaries. No prompt is necessary. Use q to indicate that the input is complete.
Below is some sample input that can be used as input for the program. The info for 4 players (names and salaries) should be read into the arrays that you set up.
Your program is going to read in the player info below and then output a menu to help you manage the roster. The options that are to be supported by your program are:
Any other option that the user enters should result in an error.
Program Start
Below is a sample start run for the program. Here you enter the information for 4 players and then a q to signal the end of input. After the input is complete, print the menu as shown here.
Print roster - Option r
To print the roster, just enter r as the option and you should see the below. Be sure to repeat the menu to the user to prompt for their next option choice.
Print Team Payroll - Option p
To get the total team salary info (payroll), enter p as the option:
Update Player's salary - Option u
Prompt for the player's name and make sure the player is on the team. If so, prompt for the new salary information and update the salary array. If the player is not on the team, issue an error and just list the menu as shown below:
Output Players above a Salary - Option s
Prompt to enter a target salary and output the player's that are current making a salary that is greater than the entered target salary.
Trade a Player - Option t (Note this is for extra credit)
Prompt for the name of the player to be traded and make sure the player is on the roster. If the player checks out, prompt for the new player's name and salary and update the arrays.
If the player is not on the roster, issue an error and display the menu.
Quit - Option q
Just enter a q to quit.
Good luck and have fun.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply