Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

  1. 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:

  1. Properties
  2. age email gender wins
    • athleteID ( > 0 )
    • athleteType
    • first_name
    • last_name
    • age (> 0 and < 120)
    • email (must contain @ and a period)
    • wins ( >= 0 )
  3. Constructors
    • Workhorse
    • String
    • String Array
    • Copy
  4. Methods
    • clone()
    • equals()
    • toString() ( make output neat and in columns )
  5. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 25th European Conference Adbis 2021 Tartu Estonia August 24 26 2021 Proceedings Lncs 12843

Authors: Ladjel Bellatreche ,Marlon Dumas ,Panagiotis Karras ,Raimundas Matulevicius

1st Edition

3030824713, 978-3030824716

More Books

Students also viewed these Databases questions

Question

=+j Describe the various support services delivered by IHR.

Answered: 1 week ago