// File: Date.h // Definition of class Date #ifndef DATE_H #define DATE_H #include class Date { public: // constructor Date( int m = 1, int d = 1, int y = 1900 ); // copy constructor Date(const Date &); void setDate( int, int, int ); // set the date Date &operator++(); // preincrement operator Date operator++( int ); // postincrement operator const Date &operator+=( int ); // add days, modify object bool leapYear(); // is this a leap year? private: int month; int day; int year; static const int days[]; // array of days per month bool endOfMonth( int ); // is this end of month? void helpIncrement(); // utility function // OK to declare here. A friend is NOT a member of the class friend ostream &operator<<(ostream &output, const Date &D); }; bool leapYear(); // is this a leap year? ostream &operator<<(ostream &output, const Date &D); #endif