Question: Design a superclass Person. Make two classes, Student and Instructor, that inherit from Person. A person has a name and a year of birth. A
Design a superclass Person. Make two classes, Student and Instructor, that inherit from Person.
A person has a name and a year of birth.
A student has a major.
And an instructor has a salary.
Write the class declarations, the constructors, and the methods toString for all classes.
Implement the Comparable interface in the Person class.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
