Question: Write a C++ console program that defines and utilizes a set of classes that are related by inheritance. Design a class named Person that has

Write a C++ console program that defines and utilizes a set of classes that are related by inheritance. Design a class named Person that has 2 subclasses that are named Student and Employee. The Employee class will itself have two subclasses named Staff and Faculty. The Person class should have data members for name, address, phone number and email address. The Student class should have a data member for class status that can take on the values ["freshman", "sophomore", "junior", "senior"]. The Employee class should have data members for office#, salary, and date hired. The Faculty class should have data members for office hours and tenure status. The Staff class should have a data member for title which would hold a value such as "Vice President". Create a member function named print that is in the root class and then override it in all subclasses. It should simply print the name of the C++ class and the name of the person. From main, create instance objects of each class and then call the print method on each object.

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 Databases Questions!