logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

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.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

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 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.

(5/5)
Attachments:

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Atharva PatilComputer science

580 Answers

Hire Me
expert
Chrisantus MakokhaComputer science

871 Answers

Hire Me
expert
AyooluwaEducation

811 Answers

Hire Me
expert
RIZWANAMathematics

702 Answers

Hire Me

Get Free Quote!

418 Experts Online