Write a C++ program with Employee, Contract, Salaried, Manager, Intern classes. The Employee class consists of employee_ID and employee_name as protected members. Contract and Salaried classes are derived from Employee in protected mode. Contract consists of a pay_per_hour protected data member. It has setPay and getPay public member functions. Salaried consists of monthlyPay as protected data member. It also has setPay and getPay public member functions. Manager is derived from Salaried in private mode. The Manager class consists of setDetails, getDetails, calculateSalary, and setSalary public member functions. setDetails updates employee_ID, employee_name, monthlyPay, and getDetails prints the values stored in these member functions. setSalary updates the salary of the manager. caculateSalary gets the number of working months and prints the total salary for the number of months the manager has worked. Intern is derived from Contract in private mode. The Intern class consists of setDetails, getDetails, calculateSalary, and setSalary public member functions. setDetails updates employee_ID, employee_name, hourlyPay, and getDetails prints the values stored in these member functions. setSalary updates the salary of the intern. caculateSalary gets the number of working hours and prints the total salary for the number of hours the intern has worked. You can use an array of objects (size n) or singly-linked lists for storing and retrieving the information. Follow coding best practices, boundary conditions, and proper function design. The menu to be created is as follows, Create Employee (Manager or Intern) Update Employee Details (Manager or Intern) Print Employee Details (Manager or Intern) Update Pay (Manager or Intern) Calculate Salary (Manager or Intern) Exit
Answers
Answered by
0
I not the question but it will work on maths
Attachments:
Similar questions
Math,
3 hours ago
English,
3 hours ago
Math,
6 hours ago
English,
8 months ago
Social Sciences,
8 months ago