Exercise 2. Default, Default-Copy, and Argument Constructor Employee Class (from Ch 13 Program Challenge 2) Write a class named Employee that has the following member variables: name. A string that holds the employee s name. idNumber. An int variable that holds the employee s ID number. department. A string that holds the name of the department where the employee works. position. A string that holds the employee s job title. Write appropriate mutator functions that store values in these member variables and accessor functions that return the values in these member variables. Once you have written the class, write a separate program that creates three Employee objects to hold the following data. A 4-argument constructor that accepts the following values as arguments and assigns them to the appropriate member variables: employee s name, employee s ID number, department, and position. A 2-argument constructor that accepts the following values as arguments and assigns them to the appropriate member variables: employee s name and ID number. The department and position fields should be assigned an empty string (“”). A default constructor that assigns empty strings (“”) to the name, department, and position member variables, and 0 to the idNumber member variable. A default Copy constructor that assigns previously created object instance to a new instance. Use the attached lab3_app.cpp, to start this Exercise 2. // Chapter 13, Programming Challenge 2: Employee Class #include
Looking for a solution written from scratch with No plagiarism and No AI?
WHY CHOOSE US?
We deliver quality original papers |
Our experts write quality original papers using academic databases.We dont use AI in our work. We refund your money if AI is detected |
Free revisions |
We offer our clients multiple free revisions just to ensure you get what you want. |
Discounted prices |
All our prices are discounted which makes it affordable to you. Use code FIRST15 to get your discount |
100% originality |
We deliver papers that are written from scratch to deliver 100% originality. Our papers are free from plagiarism and NO similarity.We have ZERO TOLERANCE TO USE OF AI |
On-time delivery |
We will deliver your paper on time even on short notice or short deadline, overnight essay or even an urgent essay |