Question: C++ Define a PayRoll class that has data members for an employees hourly pay rate (an integer , representing cents) and number of hours worked
C++
Define a PayRoll class that has data members for an employees hourly pay rate (an integer , representing cents) and number of hours worked (also an integer ). The class provides two member functions, setRate and setHours that assign the value of their parameter to the appropriate data member. The class provides a third member function, getPay, that returns weekly gross pay (in cents), computed as follows: hours times rate for the first 35 hours plus hours times rate times one and a half for any hours past 35.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
