Question: 2 4 . 2 3 LAB: Time difference The template code defines a Time class. Given a main function that reads two Times and computes
LAB: Time difference
The template code defines a Time class. Given a main function that reads two Times and computes the difference between the two, complete the following two functions:
void ReadTime
Reads input for hours, minutes, and seconds, respectively.
void TimeDifferenceTime end, Time start
Compute the amount of time elapsed from start to end. Assume start is always before end.
Adjust for negative minutes and seconds.
The main function calls a Time's ReadTime to read input from a user and uses the input to populate the Time's member variables. PrintTime is provided to output Time in hour format hh:mm:ss
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
