Derive a class ExaggeratingKid from SchoolKid, as described in the previous exercise. The new class should override
Question:
Derive a class ExaggeratingKid from SchoolKid, as described in the previous exercise. The new class should override the accessor method for the age, reporting the actual age plus 2. It also should override the accessor for the greeting, returning the child’s greeting concatenated with the words “I am the best.”
Previous exercise.
Create a class SchoolKid that is the base class for children at a school. It should have attributes for the child’s name and age, the name of the child’s teacher, and a greeting. It should have appropriate accessor and mutator methods for each of the attributes.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Question Posted: