Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Oracle Solaris 11 System Administration

Authors: Bill Calkins

1st Edition

0133007170, 9780133007176

More Books

Students also viewed these Databases questions

Question

What are the purposes of promotion ?

Answered: 1 week ago

Question

Compare the current team to the ideal team.

Answered: 1 week ago

Question

Are the rules readily available?

Answered: 1 week ago

Question

Have ground rules been established for the team?

Answered: 1 week ago