Question: in c + + Task Instructions: You are to implement a function named addOneHour ( ) that adds one hour to the current hour. The

in c++Task Instructions:
You are to implement a function named addOneHour() that adds one hour to the current hour.
The function should:
Assume you have a working getHour() and setHour(h).
If getHour() is between 0 and 22(inclusive), add 1 to the hour and call setHour() with the new value.
If getHour() is 23, the next value for hour is 0, so call setHour() with the value 0.
Return nothing, just call setHour() with the appropriate value.
The test will check the values of hours from 0 to 23 returned by getHour().
Feel free to change things around in your code, but first please get it working here with these function signatures.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!