Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 accessormutator 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 accessormutator 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 accessormutator 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 NONMember 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 NONmember display function to display the contents of your vector.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started