Question: pleasehelp me make a java programming. You are building a system to keep track of matches played by a soccer team. You need to create
pleasehelp me make a java programming.
You are building a system to keep track of matches played by a soccer team. You need to create a class to represent your matches. Call this class SoccerMatch. The class will have the following data fields and methods:
A Date data field called startTime to register the date and time for the start of the match.
A Date data field called endTime to register the date and time for the end of the match.
A String data field called location for the venue of the match
A String data field called home for the home team name.
A String data field called visitor for the visitors team name.
An array of a Player class (to be designed also) called homePlayers of size 11 for
the home team players (assume no substitutions).
An array of Player class called visitorPlayers of size 11 for the visiting team
players.
An array of Goal class (to be designed also) data field called homeGoals for the
home team goals (size 10).
An array of Goal class data field called visitorGoals for the visitor team goals
(size 10).
A no-arg constructor to create a new match.
A constructor that creates a new match on a specific date and time between
two teams.
An addHomePlayer(Player p) method that adds a player to the home team.
An addVisitorPlayer(Player p) method that adds a player to the visitor team.
A getWinner() method that returns the name of the winner. In case of a tie it
returns the word tie
An addHomeGoal(Goal g) that adds a goal for the home team.
An addVisitorGoal(Goal g) that adds a goal for the visitor team
A getHomeGoals() method to get a list of the goals for the home team.
A getVisitorGoals() method to get the goals of the visitor team.
Create a Player class for the players with the following data fields and methods:
A String field called name for the name of the player.
An int called goals to track the lifetime goals of the player.
A String field called team for the name of team of the player.
A no-arg constructor to create a new player.
Getters and setters for all the data fields.
Create a Goal class to track goals with the following data fields and methods:
An int field call minute for the minute at which the goal is scored.
A Player fields called player for the player scoring the goal.
Contructors, getters and setters for this class.
Fall 2018
Draw the UML diagram for the three classes and then implement the classes. Write a test program for a simulated soccer match.
For the UML class diagrams, create a PDF document containing all your diagrams.
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
