Question: Create the following Runner class, assuming the Athlete class has already been created. The runner class must include the following: If she only runs m100

Create the following Runner class, assuming the Athlete class has already been created. The runner class must include the following: Create the following Runner class, assuming the Athlete class has already been

If she only runs m100 and/or m200 and/or m400 then he/she is a sprinter.

If she only runs m10000 and/or m5000 and/or m3000 then he/she is a long distance runner.

If she runs any combination of sprints and long distance then he/she is a all distance runner

3. The Runner class a. inherits from the Athlete class and has a single constructor, Runner (String IName, String fName, nt birthYear, int birthMonth, int birthDay, String country) There should be a getter method for country. b. The Runner class stores race events for the runner. Each event is of type enum Distance. The list of valid events is given as an enumeration Add the statement below as a class field public enum Distance M100, M200, M400, M3000, M5000, M10000 c. A runner participates in one or more of these events. Thee setEvent method is oveloaded and sets either a single event for the runner or set a group of events for the runner d. The toString method returns a string in the form : " AAA BBBB is XX years, YY months and ZZ days and is a professional sprinter from JJJJJJJ and participates in these events: [MX00, MY00, MZ00]

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!