Clock P48763


Statement
 

pdf   zip   main.cc

html

Implement the following class:

class Clock { public: Clock (); void reset (); void increase (); void print () const; };

The default constructor must create a clock set to midnight time (00:00:00). The reset() method resets the clock to midnight time. The increase() method increases the clock a second. The print() method prints the time of the clock in the format HH:MM:SS in a line.

Observation You only need to submit the required procedure; your main program will be ignored. Strictly obey the type definitions of the statement.

Information
Author
Jordi Petit
Language
English
Official solutions
C++
User solutions