Question: *Java Code* 1) Design an abstract class for Athlete a) Define at least 2 data members i) String SportType b) Write a constructor for the

*Java Code* *Java Code* 1) Design an abstract class for Athlete a) Define

1) Design an abstract class for Athlete a) Define at least 2 data members i) String SportType b) Write a constructor for the class that will accept initial values for the 2 data members c) Design a child class of the Athlete called Tennis i) String FullName Write a toString method i) Add a data member to store number of games won this season 2) ii) Add a constructor that accepts this the person's name and number of games won as parameters iii) Write a new toString that will first call the toString of the parent and then add on the new data member for the the number of games won 3) Design a child class of the Athlete called Baseball i) Add a data member to store batting average ii) Add a constructor that accepts this the person's name and batting average as parameters iii) Write a new toString that will first call the toString of the parent and then add on the new data member for the batting average 4) In main methood a) Make an object of Tennis and then output using the toString method b) Make an object of Baseball and then output using the toString method Sport: Bob Smith Name: Baseball Batting Average: 0.678 Sport: Sue Jones Name: Tennis Games won this season: 15

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!