Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I came to this site looking for a solution to this problem (Starting out with C++ from control structures through objects - 8th Edition -

I came to this site looking for a solution to this problem (Starting out with C++ from control structures through objects - 8th Edition - Chapter 14, Challenge 5 - Time Off), and there is none. Where can I find the completed program so I can see what I am doing wrong?

I have #4 done. Do you need to see that one as well?

Question as follows:

Write a program to accomplish Programming Challenge #5 Time Off & overload the six relational operators comparisons should be done based on the total number available days for the employee on Pg. 885 & 886. The total amount of TimeOff available is calculated as follows: (MaxSickDays-sickTaken)+(MaxVacation-vacTaken)+(MaxUnpaid-unpaidTaken) The highest possible amount of MaxVacation should NOT exceed 240 hours

5. Time Off NOTE: This assignment assumes you have already completed Programming Challenge 4. Design a class named TimeOff. The purpose of the class is to track an employee's sick leave, vacation, and unpaid time off. It should have, as members, the following instances of NumDays class described in Programming Challenge 4. maxSickDays A NumDays object that records 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 the 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 maximum number of days of unpaid vacation the employee 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 function 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 maxVaction object to store a value greater than this amount.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

Students also viewed these Databases questions

Question

I have to wait until payday to (ascertain) whether I got the raise.

Answered: 1 week ago

Question

Youll never be promoted unless you (endeavor) to be more patient.

Answered: 1 week ago