// class to represent 24-hour digital clock class Clock { public: Clock(const int hh, const int mm, const int ss); // precondition: // 0 <= hh <= 23 // 0 <= mm <= 59 // 0 <= ss <= 59 // postcondition: // Clock object has time hh:mm:ss Clock(void); // precondition: none // postcondition: // Clock object has time 00:00:00 void increment(void); // precondition: none // postcondition: Clock object's time has been // incremented by one second. void reset(const int hh, const int mm, const int ss); // precondition: // 0 <= hh <= 23 // 0 <= mm <= 59 // 0 <= ss <= 59 // postcondition: // Clock object has time hh:mm:ss void print(void); // precondition: none // postcondition: Clock object's time printed to // stdout, as "The time is hh:mm:ss\n". private: int h, m, s; // Clock object's time } ;