Write a program with a class called CheapWatch that provides the time of day in
ID: 3626475 • Letter: W
Question
Write a program with a class called CheapWatch that provides the time of day in a program. Three unsigned integers should 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 converts a long integer representing the number of seconds from midnight into your three-integer (hour, minute, second) representation. For example, if the long integer 18637 should convert to 5:10:37, you may use the following formula:
Elapsed seconds = (hours * 3600) + (minutes * 60) + seconds.
Use military time. For example, 3:40 PM is represented as 15:40:00.
(Hint: Design the CheapWatch class where the 3 integers representing time are to be treated as private data members. Include a standard constructor, a type conversion constructor, and a function that shows the time as public function members. In your design, identify with a comment the constructor member function. Ask the user to enter the number of seconds after midnight; output the seconds converted to military time. Make sure the output is formatted properly with appropriate manipulators, formatting flags and formatting functions.)