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.
1.Write the class declarations, the constructors, and the methods toString for all 3 classes.
2.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 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 Programming Questions!