Question: Need help with C++ program please have instructions due SOON thanks; needs to g++(compile 3 cpp files like g++ prog6.cpp timeoff.cpp numdays.cpp); Thank you for
Need help with C++ program please have instructions due SOON thanks; needs to g++(compile 3 cpp files like g++ prog6.cpp timeoff.cpp numdays.cpp);





Thank you for the help !Thumbs UP!
Mandatory Instructions This program will ulize two classes, NumDays and TimeOff These classes will then be used in client source ile. Part I: NumDavs Class Create a class called NimDay which will represent mmber of work hours and automatically convert the hours to mumber of days. For example, 8 hours would be automatically converted to 1 day, 12 bours would be converted to 1.5 days, and 18 hours would be converted to 2 Type the class declaration with data members and member fiunction prototypes into a file named numdays.h. Place all member function deinitions in a file named numdays.cpp Private data menbers: hours nt day (double) Public member functions: Default constructor -sets hours, days to zero Overloaded constructor accepts hours as parameter, automatically calculate mumber of equivalent days Mutators (setters) and accessors (getters) to set and get the hours and days values // Mutators void setHours (int) void setDays (int); // Accessors int getHours() const; double getDays() const . An overloaded operator that subtracts two objects (opentor-implemented as a member function) Ad overloaded operator (prefix and postfix version) to increment mumber of hours stored in an object. The days should be automatically NumDays operator-(const NumDays &) NumDays operator+O; NumDays int); . An Hours: h (where h is the hours operator that displays a NmDays object in the form Days: d (where d is the days private data member) -" folowed by te data member). See example below. This overload must be implemented as a non-member function. Days 20 . An overloaded operator that accepts values for a NumDays object entered as a doubie value of days (e.g, 5.25) and stores the days and hours amounts comectiy in the NiumDays object's data members (assumme 8 hours is one day). Input of 2.25 days would be stored as 18 hours. /I implemented as non-member functions friend ostrean& operator
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
