Question: In c++, Design a a class name TimedOff. The purpose of the class is to track an employees sik leave, vacation, and unpaid time off.
In c++, Design a a class name TimedOff. The purpose of the class is to track an employees sik leave, vacation, and unpaid time off. It should have, as members, the following instances of the NumDays class described: maxSickDays A NumDays object that recors the maximum number of days of sick leave the employee may take. sickTaken A NumDays object that records the number of days of sick leave the employee has already taken. maxVacation a NumDays object that records the maximum number of days of paid vacation that employee may take. vacTaken a NumDays object that records the number of days of paid vacation the employee has already taken. maxUnpaid a NumDays object that records the maxium number of days of unpaid vacation the employee has may take. unpaidTaken A NumDays object that records the number of days of unpaid leave the employee has taken. Additionally, the class should have members for holding the employee's name and identification number.It should have an appropriate constructor and member functions for storing and retrieving data in any of the member objects. input validation: company policy states that an employee may not accumulate more than 240 hours of paid vacation. The class should not allow the maxVacation object to store a value greater than this amount.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
