Question: Create a class called SchoolKid that is the base class for children at a school. It should have attributes for the childs name and age,

Create a class called SchoolKid that is the base class for children at a school. It should have attributes for the childs name and age, the name of the childs teacher, and a greeting (String type). It should have appropriate accessor and mutator methods for each of the attributes.

Derive a class ExaggeratingKid from SchoolKid. The new class should override the accessor method for the age, reporting actual age plus 2. It also should override the accessor method for the greeting, returning the childs greeting concatenated with the words I am the best.

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!