Question: I need JAVA code for this question. You are going to develop a class to represent sports players. *For the instance variables, add the below

 I need JAVA code for this question. You are going to
I need JAVA code for this question.

You are going to develop a class to represent sports players. *For the instance variables, add the below ones. Make sure that these values cannot be accessed from other classes. Name of the player Age of the player Jersey number *Write at least two constructors (not the default one) *For this class, make sure you follow the encapsulation rules. (Add methods that you think are necessary for encapsulation) *Override the toString method. Return everything in a proper format *Implement a class that will represent a soccer team. *For the instance variables, add the below ones. Make sure that these values cannot be accessed from other classes name of the team number of wins number of losses number of games played players *Write at least two constructors (not the default one) *For this class, make sure you follow the encapsulation rules. (Add methods that you think are necessary for encapsulation) *Write two additional methods. One of them will increase wins by one and the other one will decrease losses by 1 *Write another method to decide if a team is good by returning true if wins are bigger than losses. *Write another method to add players to this team. *Write another method to search a player in this team by his/her name. If you can find it, return it *Write another method to search a player in this team by his/her jersey number. If you can find it return it. "Lastly add a method to increase the number of games. (When a team plays a game, you will increase this value by this method) *Override the toString method. Return everything including the player names. Finally, use this class with a main method. The general flow is up to you. But make sure you use the methods you created in the classes

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!