Question: In Java, 1) Create an Athlete Class that has data to keep track of a name and a number of points --that is always a
In Java, 1) Create an Athlete Class that has data to keep track of a name and a number of points --that is always a non-negative whole number 2) You should make a constructor for the Athlete 3) There should be ways to get and set the data in 1). You should always ensure that the lowest number of points is 0 (no negative points) 4) equals should be overridden to say that two athletes are equal if they have the same number of points 5) There should be a toString method that outputs the name, a space and the number of points.
6) Create a Team class that can consist of any number of Athletes 7) The Team Class constructor should take in an integer that represents the number of people on the Team 8) The Team Class should have an add function that adds people to the Team 9) The Team class should have a toString that prints out each team member on a separate line correctly without recording how to print out the Athlete. 10) The Team class should have an equals function wherein two teams are equal if they have the same AVERAGE number of points.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
