you will create a driver (main) that will handle the personnel records for a company and generate a report.C++ Programming

Instructions

This assignment uses two classes that utilize the concept of aggregation. One class will be called TimeOff. This class makes use of another class called NumDays. Then you will create a driver (main) that will handle the personnel records for a company and generate a report.

TimeOff class will keep track of an employee’s sick leave, vacation, and unpaid time off. It will have appropriate constructors and member functions for storing and retrieving data in any of the member objects.

Data members of TimeOff:

  • name as string – name of employee
  • empNum as integer – employee ID
  • maxSickDays as NumDays
  • sickTaken as NumDays
  • maxVacation as NumDays
  • vacTaken as NumDays
  • maxUnpaid as NumDays
  • unpaidTaken as NumDays

 

Validation:

  • Company policy states an employee may not accumulate more than 240 hours of paid vacation. So, once at 240 hours, they stop earning.
  • Employee should not be able to take more vacation time than what is earned.
  • Employee should not be able to take more sick time than what is earned.
  • Employee should not be able to take more unpaid time than what is earned

 

Required Methods:

  • A constructor default
  • A constructor with parameters for all the data members
  • Accessors and mutators for all data members.
  • Overload the << operator which will output the report about the employee. The vacation, sick and unpaid information.

 

NumDays class is to store a value that represents a number of hours which is also converted to the number of days the hours are equivalent to. Every 8 hours is converted to 1 day. So 12 hours is converted to 1.5 days for example.

 

Data members of NumDays:

  • hours as double
  • days as double

 

Required Methods:

 

  • A constructor with a parameter for the number of hours.
  • Accessors and Mutators for all data members.
  • Overload the addition operator (+)
  • Overload the subtraction operator(-)
  • Overload the Prefix and Postfix increment operator (++)
  • Overload the Prefix and Postfix decrement operator(--)

Main will create an instance of the TimeOff class to represent one employee. The program does not need to ask the user for input. The program should increase and decrease the amount of vacation time, sick time and unpaid time. Showing that all the requirements are met. In other words, create a test plan.

Then create a second instance of TimeOff and assign the first instance of TimeOff to the second. Show both reports to show they are the same.

Attachments:

Instructions Files

C++ Programming Experts

expert
Eric Bell
C++ Programming

88 Answers

expert
Dinh Hong P.
C++ Programming

20 Answers

View More Experts
Disclaimer

The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.

Get Free Quote!

267 Experts Online