#ifndef DATE_H #define DATE_H /* This is the header file for class date. Jan 1, 0 AD is day 0 Jan 2, 0 AD is day 1 Dec 31, 0 AD is day 364 Jan 1, 1 AD is day 365 etc. so day / 365 is the year and day % 365 is the day of the year (in the range 0 to 364 inclusive) */ class date { //Declarations for data members: int day; static const int length[]; //static data member public: //Declarations for member functions: date(int init_month, int init_day, int init_year); //constructor date(); //default constructor static int monthsInYear(); //static member function void print() const; //const member function void next(int n); //non-const member functions void next(); void prev(int n); void prev(); //int distance(const date& another) const; //member function friend int distance(const date& d1, const date& d2); //friend function }; #endif