Question
The Athletes text file has the following fields that are separated by a tab: athleteID athleteType first_name last_name age email gender wins Create a FULL
The Athletes text file has the following fields that are separated by a tab:
athleteID athleteType first_name last_name age email gender wins
Create a FULL class that contains the above information. A "Full" class requirements are listed below.
You will turn in 2 java files: Tester and Athlete
First 10 from athlete.txt
athleteID athleteType first_name last_name age email gender wins 1 LongDistanceRunner Ronna Tettersell 34 rtettersell0@themeforest.net Female 94 2 LongDistanceRunner Olag Hopkyns 26 ohopkyns1@dyndns.org Male 129 3 HockeyPlayer Joana Ollerhad 17 jollerhad2@tmall.com Female 116 4 MiddleDistanceRunner Cchaddie Spooner 31 cspooner3@sphinn.com Male 72 5 HockeyPlayer Rutherford Jancik 32 rjancik4@sogou.com Male 175 6 HockeyPlayer Wilone Clee 27 wclee5@elegantthemes.com Female 196 7 MiddleDistanceRunner Nollie Antrack 31 nantrack6@forbes.com Female 10 8 FootballPlayer Rivkah Brawley 31 rbrawley7@abc.net.au Female 102 9 LongDistanceRunner Lammond Sibborn 30 lsibborn8@mozilla.com Male 152 10 LongDistanceRunner Baldwin Kingsnode 18 bkingsnode9@ifeng.com Male 154
Tester:
- Methods
- load(fileName) Send in the name of the file to be loaded
- printAthletesByAgeRange(int from, int to)
- prints all athletes between and including the from and to
- printAthletes(String gender)
- prints all athletes with given gender
- printCounts()
- prints the number of Football Players
- prints the number of Runners
- prints the total number of wins for all athletes
- prints the total number of wins by gender
- printAthletesWithWinsGreaterThan(String type, int winCount) note: if type = "runner" than count both MiddleDistanceRunner and LongDistanceRunner
- prints all athletes that have more than winCount
- printAllAthletes()
- Simply prints all 1000 athletes
Athlete:
- Properties
- age email gender wins
- athleteID ( > 0 )
- athleteType
- first_name
- last_name
- age (> 0 and < 120)
- email (must contain @ and a period)
- wins ( >= 0 )
- Constructors
- Workhorse
- String
- String Array
- Copy
- Methods
- clone()
- equals()
- toString() ( make output neat and in columns )
- Getters / Setters
- all getters / setters
- Add data checks for athleteID, age, and wins
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started