Question: in JAVA 3 a) Design a Class which represents a Sports Person. It is to have a name field and observer and display methods (6
in JAVA 3 a) Design a Class which represents a Sports Person. It is to have a name field and observer and display methods (6 marks)
b) Design an Athlete subclass of the SportsPerson class. It is to have the following extra fields, event which indicates that athletes event, a field representing their Personal Best and the time for their latest run. Again supply any methods you deem appropriate. (9 marks)
c) Write a program which creates 5 instances of class athlete and adds them to a vector called race. It removes the athlete with the worst personal best from the vector and then displays the remaining 4 athletes. (15 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
