// DateTime.h // Declaration of the Time and Date class. // Member functions defined in DateandTime.cpp // preprocessor directives that // prevent multiple inclusions of header file #ifndef DateTime_H #define DateTime_H class Time { public: Time( int = 0, int = 0, int = 0 ); // constructor // set functions void setTime( int, int, int ); // set hour, minute, second void setHour( int ); // set hour void setMinute( int ); // set minute void setSecond( int ); // set second // get functions int getHour(); // return hour int getMinute(); // return minute int getSecond(); // return second void printMilitary(); // output military time void printStandard(); // output standard time void tick(); private: int hour; // 0 - 23 int minute; // 0 - 59 int second; // 0 - 59 }; #endif // Simple Date class class Date { public: Date( int = 1, int = 1, int = 1990 ); // default constructor void print(); void nextDay(); bool isLeapYear(); private: int month; int day; int year; };