Question: Implement a superclass Person. Make two classes, Student and Instructor, that inherit from Person. A Person has a first name, last name, and ID number.

Implement a superclass Person. Make two classes, Student and Instructor, that inherit from Person. A Person has a first name, last name, and ID number. A Student has a major and class (Freshman, Sophomore, Junior, Senior, Graduate) while an Instructor has a title (Professor, Associate Professor, Assistant Professor", or "Adjunct Professor), and a department. Write the class declarations, constructors, and the __str__ method for all three classes. For each class, define the following additional methods:
Person - getFirstName, getLastName, getIDNumber, setFirstName, setLastName, setIDNumber
Student - getMajor, getClass, setMajor, setClass
Instructor - getTitle, getDepartment, setTitle, setDepartment
Use people.py Download people.pyas a starting point for this program and use people_demo.py Download people_demo.pyas a basic starting point for testing and demonstrating that your class works as expected. Feel free to define additional objects and be sure to test each method for the objects you create.

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!