Question: c + + Person Program Create the following classes: Person: Contains private data for first name, last name, street address, zip code, and phone number.

c++ Person Program
Create the following classes:
Person:
Contains private data for first name, last name, street address, zip code, and phone number.
Create accessor/mutator functions for each private data item.
Include a virtual display function that will display all of the persons information on a single line.
Employee:
Employee is a child of Person. An employee also includes a Social Security number, department name.
Create accessor/mutator functions for the additional private data items.
Include a virtual display function that will display ALL of the persons information on a single line.
Customer:
Customer is a child of Person. A customer also includes a discount percentage and an email address.
Create accessor/mutator functions for the additional private data items.
Include a virtual display function that will display ALL of the persons information on a single line.
Write a program that declares a vector of either employees and customers. You must do this in the same vector (Hint: create a vector of Person).
Prompt the user to specify which type of person's data will be entered or allow the user to quit. While the user chooses to continue, accept data for the appropriate type of person.
Create a NON-Member function that will accept each individual person in the vector as a parameter (not the entire vector) and display their information.
Once the user has finished entering in both employees and customers, use a loop and your NON-member display function to display the contents of your vector.

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!