Question: java 20 Points Question 13 Define a class with the following specifications: Che class called Marathon Runner that has three private data members:name (String), distance
20 Points Question 13 Define a class with the following specifications: Che class called Marathon Runner that has three private data members:name (String), distance (double and time (double While contractor that accepts name, distance, and time as input parameters to initializeivate distance hvide bly one accessoriget) method and one mutator (set) method for the distance data member Delle a private method called calculateSpeed) which calculates and returns the speed (double) of the mer. The speed is calculated using the formula: speed = Delime s poble method called Faster) that accepts as input parameter a speed record(double). The mebed bould retur true if the current runnet's speed is faster than the speed record, otherwise, return Delima pablik metbed called display Detail) to display on the screen the runner's details as in the Runner name: Ahmed Distance traveled: 11700 m Time lapsed: 2372.0 Runner's Speed: 493 m/s
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
