Answer to Question #304676 in Java | JSP | JSF for sandyJay

Question #304676

Create a class called Match that will have team objects

Data Members: This class has 2 data members named HomeTeam and VisitorTeam which will store that 2 teams that will play the Match.

Methods: This class only have one constructor which receives two Team object that will be assigned to HomeTeam and VisitorTeam, same to setTeams(),which receives two Team... playMatch(), simulates match play by calling the scoreGoals methods of each team. getPlayGound(), returns the ground of play which is the HomeGound of the HomeTeam. isDrawMatch(), will return true if the Match is a draw and false if there is a winner. The match is a draw if the goals of the teams are equal.

In the main function use your classes to create object and demonstrate their functionality. Create two team object prompt the user to enter the team name and the home ground name of each Then display the results of the match, note that the isDrawMatch method should be called to determine if match is draw and display different output


0
Service report
It's been a while since this question is posted here. Still, the answer hasn't been got. Consider converting this question to a fully qualified assignment, and we will try to assist. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS