Question: Design a class name Person and its two derived classes named Student and Employee. Make Faculty and Staff derived classes of Employee. A person has

Design a class name Person and its two derived classes named Student and
Employee. Make Faculty and Staff derived classes of Employee.
A person has a name, address, phone number, and e-mail address.
A student has a class status (freshmen, sophomore, junior, or senior).
An employee has an office and salary. A faculty member has a rank (instructor, assistant professor, associate professor , and professor).
A staff has a title (technician, administrator, etc.).
Define a constant virtual toString function in the Person class and override it in each class to display the class name and the persons name.
Implement all these classes.
Write a test program that creates two students, two faculty, two employees, two staff to invoke the toString function.

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!