Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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: image text in transcribed

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

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

Students also viewed these Databases questions

Question

Explain in brief the functions and functioning of stock exchanges.

Answered: 1 week ago