There are no test cases for this-- feel free to test it any way you want in main. Composition Requirements 1) Create an Athlete Class which 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 overidden 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 recoding 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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
JAVA

There are no test cases for this-- feel free to test it any way you want in main.
Composition
Requirements
1) Create an Athlete Class which 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 overidden 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 recoding 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.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education