Answered step by step
Verified Expert Solution
Question
1 Approved Answer
write a C++ program using classes. (need 3 Constructors, mutator functions, main function). 2. neployen Class Write a class named zeployee that has the following
write a C++ program using classes.
2. neployen Class Write a class named zeployee that has the following member variables: - name. A string that holds the employee's name. - idsusber. An int variable that holds the employce's ID number. - departannt. A string that holds the name of the department where the troones vorks: - position. A string that holds the employee's job tide. The class should have the following constructors: - A constructor that accepts the following values as arguments and assigns then the appropriate member variables: employee's name, employee's ID number, dose: ment, and position. - A constructor that aceepts the following values as arguments and assigns them to gy appropriate member variables: employee's name and ID number. The departes and position fields should be assigned an empty string (n=). - A default constructor that assigns empty strings (" ") to the name, departnont, in position member variables, and 0 to the idsumber member variable. Write appropriare mutator functions that store values in these member variable al accessor functions that return the values in these member variables. Once yoe tiviy written the class, write a separate program that creates three Employee objects to hin the following data. The program should store this data in the three objects and then display the das each employec on the screen (need 3 Constructors, mutator functions, main function).
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