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
Get step-by-step solutions from verified subject matter experts
