Implement a class that represents an amount of time in hours, minutes, and seconds.
The class should provide a constructor that sets the time to a specified number of hours, minutes, and seconds.
The default constructor should create an object for a time of zero hours, zero minutes, and zero seconds.
The class should provide getter methods that return the hours, minutes, and seconds separately, and a getter method that returns the total time in seconds
(hours × 3600 + minutes × 60 + seconds).
A comparison method should be provided that test which time passed as parameters are greater.
If the two times are equal, the method should return 0. If the object time is less than the passed parameter, it should return -1.
If the object time is greater than the passed parameter, it should return 1.
A method should be provided that adds one time to another, and another function that subtracts one time from another.
The class should not allow negative times (subtraction of more time than is currently stored should result in a time of 00:00:00).
The constructors should set all the hours, minutes, and seconds to 0 if any of the three values are out of range.
프로그래밍 과제인데
일단 시간가지고 놀아야한다는건 알겠는데 어떻게 노는건지 잘 모르겠듬.
초를 넣어서 시/분/초가 나오게 하란건가.