Question: Write a Java program for the eSports program. In particular, your program should do the following: At the beginning of the program load the player
Write a Java program for the eSports program.
In particular, your program should do the following:
At the beginning of the program load the player and team data from the file, teamData.txt
Output a menu with options for creating a match, listing all matches, declaring an outcome for an existing match, and terminating the program and prompt the user to choose an option.
You should validate the users input.
If option is chosen:
Prompt the user for the information needed to create a match.
Prompt the user for the name of the game for the match.
List all the teams and ask the user to choose two.
Validate the match. If the teams do not play the game, then prompt for all information again.
Create the match and add it to the list of matches.
Return to the main menu.
If option is chosen:
Output all the matches to the console.
Return to the main menu.
If option is chosen:
Prompt the user to enter the match number.
You should validate the users input.
Prompt the user to choose which team won the match.
Update the statistics of each team eg winning team gets win and losing team gets loss.
Return to the main menu.
If option is chosen:
Save the team and player information to an output file, teamData.txt
Terminate the program.
Implementation details:
You will declare the following classes: Team, Player, and Match. Team and Player have not changed from the previous assignment.
Match:
Home team : Team
Away team : Team
Game : String
Team:
Name : String
Wins : int
Losses : int
Game : String
Array of players : Player
Player:
Name : String
Age : int
Rank : int
The fields of these classes should all be private. You will thus need to define getters and setters for each field.
Do not write accessors that expose the list of players in Team.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
