4. NumDays Class Design a class called NumDays. The class's purpose is to store a value that represents a number of work hours and convert it to a number of days. For example, 8 hours would be converted to 1 day, 12 hours would be converted to 1.5 days, and 18 hours would be converted to 2.25 days. The class should have a constructor that accepts a number of hours, as well as member functions for storing and retrieving the hours and days. The class should also have the following overloaded operators: + ++ Addition operator. When two NumDays objects are added together, the over- loaded + operator should return the sum of the two objects' hours members. Subtraction operator. When one NumDays object is subtracted from another, the overloaded - operator should return the difference of the two objects' hours members. Prefix and postfix increment operators. These operators should increment the number of hours stored in the object. When incremented, the number of days should be automatically recalculated. Prefix and postfix decrement operators. These operators should decrement the number of hours stored in the object. When decremented, the number of days should be automatically recalculated.
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
C++ Visual Studio 2019
NumDays, TimeOff, and Personnel Report
Complete #4, 5 & 6 . Please submit just one file for the classes and main to test the classes. Just create the classes before main and submit only one cpp file. Do not create separate header files. There is a sample NumDays class in a text file for you to use as a base.



Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images









