This is my assignment
I have to send it today
and this week I have many test and I did not any time for solve it
please
please I need help
ITCS102
Assignment #5(chapter 12)
Create a class called Employee that maintains information about an employee in a company, each employee has the following data members:
1. CPR, // long int
2. name, // string
3. salary // double
4. position // string
5. birth_date // struct Date that holds int day, int month, int year
Your class should define the following function
1. Constructor function with default values CPR = 0, name = “”, salary = 0, position=””, birth_date={0,0,0}
2. Set and get functions for all data members.
3. Overloaded functions for setBirthDate one that takes a birth_date as parameter and the other one takes int,int,int for birth_date.
4. InputData // asks the user to enter all the details of an employee and assign the values to the data members
5. outputData// Print the details (CPR, name, salary, position, birth_date) of an employee.
Part A:
Write the class Employee including the code of all member functions.
Part B:
Write a function search that receives an array of employees , it’s size and a key value representing a CPR number, the function should check if any of the employees in the array holds the passed CPR . The prototype of the function is:
int search ( Employee A[], int size, int key);
Part C:
Write a main function which includes the following:
1. Defines an array called employee_list to hold the information about the employees of a company
2. makes a loop to enter the information about 5 employees and save them in the array.
3. Asks the user to enter a CPR number and call the search function to check if it represents a valid employee.
4. if the employee is valid, allow the user to update his salary by calling the setSalary function
5. displays all old employees who were born in the year 1965 or before.
6. displays all managers in the company.