Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Implement a superclass Person. Make two classes, Student and Instructor, that in

ID: 640931 • Letter: I

Question

Implement 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. Writhe the class definitions, the constructors, and the methods toString for all classes. For Person the constructors should include a no-arg constructor and one that accepts in the name of the person. For student there should be a no-arg constructor and a constructor that accepts in both name and major. And, for Instructor there should be a no-arg constructor as well as one that accepts in name and salary.

Supply a test program that exercises all of the capabilities of each class.

Explanation / Answer

class Person { private String name; private int year; Person(String name, int year) { this.name = name; if (year
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote