Question: Please produce this code in Java with explanation The National Basketball Association Game System will consist of four main components: team management, player management, an
Please produce this code in Java with explanation
The National Basketball Association Game System will consist of four main components: team management, player management, an association component, and a season scheduling component.
The association component allows users to manage the teams and game season via textbased menus.
The team management stores a team list, while each team has its own players. The team management component is capable of displaying all teams, displaying all players, adding a new team, managing an existing team, deleting an existing team, and displaying all players at a particular level.
The player management component is accessible from the team management menu. The player management component allows displaying all the players that belong to this team, the registration and removal of players in this team, and the update of players information.
Each players information includes the name, credit, No level, and age, while the level is calculated based on the credit.
The season scheduling component allows users to start a new season, while each season contains multiple rounds, and each round contains multiple games. Users can register the team for the round, display the teams in the current round, run the games in the round, and display the game results. After the round is completed, the players credits will be updated according to the result and the average credit differences between the two teams. Gaming rules are listed below to make it as clear as possible:
Game: Each game is played between teams and generates one winner and one loser. The team that has a LARGER AVERAGE CREDIT will WIN this game. Suppose we have two teams in a game: Team A and Team B The average credit of As players is and the average credit of Bs players is As A will be the winner of the game.
Round: A season may contain multiple rounds. Each round may contain several games, and the number will be decided by how many teams register. Suppose we have teams, namely A B C and D Then there will be games in the first round, ie team A vs team C and team B vs team D After the first round is completed, the winners of each game will be automatically added to the next round.
An illustration of this process is listed in Season:
When registering the first team for a season, a game will be created automatically, and the round number of the Season and the term number of the game will start from When the second team registers for the season, the round number of the Season and the term number of the game stays the same, and the second team will be assigned to the same game as the first team.
When registering the third team for a season, a new game will be created automatically, and the round number of the Season will be kept as while the term number of the game will increase to representing the second game. When the fourth team registers for the season, the round number of the Season and the term number of the game stays the same as the third team, as the third team will compete with the fourth team.
After playing games in the current round, two winning teams will be recorded and only the winning teams can register for the next round. In such case, the round number will increase to and the term number will start from
Requirements for coding the game:
Classes your design will consist of these classes for java
Association: The fields contain Teams and Season.
Season: The fields contain the scheduled game list, the round number, the team list and the record list.
Teams: The fields contain the team list.
Team: The fields contain the Team name and the players.
Players: The fields contain the player list.
Player: The fields contain name, credit, level, age, team and No
Game: The fields contain the Team list, result list and the term.
Record: The fields contain the WinTeam LoseTeam, GameNo and round number Utils this is the class to facilitate format, do not change
Fields All the fields have been clarified in each class and they should not be modified. The fields
also have some additional requirements and structures:
Lists all have the abstract type of List but must be instantiated with a concrete type that implements the List behavior you can choose either you may also want to think about why you might do things this way
Constructors the constructors of the class have the following requirements:
The main method of the program will be in the Association class
All constructors initialize the fields of their classes.
The Association, Teams, Season, and Players constructors take no parameters.
The Team constructor takes one parameter, the name, corresponding to the fields identically named. Other fields require no parameters but the constructor methods.
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
