Question
(IN C++) - Class Constructs & Inheritance a. Create a date class with attributes of month, day, and year. b. Create an employee class for
(IN C++) - Class Constructs & Inheritance
a. Create a date class with attributes of month, day, and year.
b. Create an employee class for storing information related to employee information for the CS1C Corporation. This class should contain the employees name, employees Id, phone number, age, gender, job title, salary, and hire date.
- You should write a series of member functions that change the employees name, employees Id, phone number, age, job title, salary, and hire date. - You should use your date class (composition) when accessing hire date. - You should write a print function that prints all information related to an employee. - You should write a client to test all your member functions. Print the before and after when testing your change functions. You should write at least two different constructors (default and non-default).
c. Create the following classes:
- Programmer class that is derived from the employee class with the following private data members:
i. Department number ii. Supervisors name iii. Percentage of last salary increase iv. A C++ identifier (true if the employee knows C++) v. A Java identifier (true if the employee knows Java)
- Software architect class that is derived from the employee class with the following private data members:
i. Department number ii. Supervisors name iii. Percentage of last salary increase iv. Years of experience designing software projects
- You should write at least two different constructors (default and non-default) for the classes above. - You should write a series of member functions that change the private data members of the derived classes. - You should write a print function that prints all information related to the Programmer class and the Software architect class. - You should write a client to test all your member functions. Print the before and after when testing your change functions.
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