The goal of this exercise is to program the basic functionality of a Clock
. Each instance of a clock should be made by giving it the hour, minute and second or the total number of seconds. In the second case, this should be properly converted to the associated hours, minutes and seconds.
We expect the following functionalities to be available in your class:
tick()
method.timeInSeconds()
displayTime()
method. The output is expected to be "The time is:" followed by a new line, on the second line we expect the time in the following format: "hh:mm:ss" main()
method is needed for this exercise!From Calculator - DeviantArt1