Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef TIME_H
- #define TIME_H
- class Time
- {
- public:
- public:
- Time( int = 0, int = 0, int = 0 ); // default constructor
- ~Time(); //default destructor
- // set functions
- void setTime( int, int, int ); // set hour, minute, second
- void setHour( int ); // set hour (after validation)
- void setMinute( int ); // set minute (after validation)
- void setSecond( int ); // set second (after validation)
- // get functions
- int getHour() const; // return hour
- int getMinute() const; // return minute
- int getSecond() const; // return second
- void printUniversal() const; // output time in universal-time format
- void printStandard() const; // output time in standard-time format
- private:
- int hour; // 0 - 23 (24-hour clock format)
- int minute; // 0 - 59
- int second; // 0 - 59
- }; // end class Time
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement