Write a program with a class called CheapWatch thatprovides the time of day in a
ID: 3619351 • Letter: W
Question
- Write a program with a class called CheapWatch thatprovides the time of day in a program. Three unsigned integersshould be used to represent time:
- The first integer should represent the hour.
- The second integer should represent the minutes.
- The third integer should represent the seconds.
Include in the program a type conversion constructor that convertsa long integer representing the number of seconds from midnightinto your three-integer (hour, minute, second) representation. Forexample, if the long integer 18637 should convert to 5:10:37, youmay use the following formula:
Elapsed seconds = (hours *3600) + (minutes * 60) + seconds.
Use military time. For example, 3:40 PM is represented as15:40:00.