// simpledate.h // Comments here are instructional...don't code like this. #ifndef _SIMPLEDATE_H_ #define _SIMPLEDATE_H_ const int NUM_MONTHS = 12; // standard (i.e. not leap year) number of days in each month const int monthLengths[NUM_MONTHS] = { 31, // Jan 28, // Feb 31, // Mar 30, // Apr 31, // May 30, // Jun 31, // Jul 31, // Aug 30, // Sep 31, // Oct 30, // Nov 31, // Dec }; class SimpleDate { // "class declaration" public: // "constructors" SimpleDate(); // "interface" SimpleDate(int newMonth, // (just member function declarations) int newDay, // int newYear); // // // "methods" or // // "member functions" // bool isValid(); // // int getMonth(); // int getDay(); // int getYear(); // // bool isBefore(SimpleDate d); // private: int daysInMonth(int month, // part of the "implementation" int year); // (most is in source file) // // "member variables" // int month; // int day; // int year; // }; // <--- Don't forget this semicolon! #endif // _SIMPLEDATE_H_