Write a Clock class that measures hours, minutes, and seconds.
Include the following methods:
(a) __
init__ ,__str__ ,__repr__ .(b) Addition allows for both clock-to-clock operations and clock-to-integer operations. If one argument is an integer, the integer is assumed to represent hours. Addition should be commutative!
(c) Output should always be rounded to the second.
(d) If inappropriate values are passed to the constructor, the created clock instance should get a value of 0 hours, 0 minutes, and 0 seconds.
Include sample code that uses your class and demonstrates the use of all methods as well as error handling.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.