#include const int MAX_APPOINTMENTS = 10; class Date { public: Date(); // constructor. JDN is set to today // numberAppointments = 0 Date(int mm, int dd, int yyyy); // constructor JDN is set to correspond to date specified by // mm dd yyyy, if it is a valid date. Otherwise JDN is set // for today. numberAppointments = 0; void setDate( int mm, int dd, int yyyy); // set JDN to appropriate value // precondition mm dd yyyy is a valid date void setDate( float jdn); // set JDN of Date object that activeted the method to jdn. float getJDN(); // returns the Julian day number of the date object that activates the // method int getDayOfWeek(); // return int 0..6 representing the day of the week void getMonthDayYear(int & m, int &d, int &y); // return ints representing the month, day, and year of a Date int numAppointments(); // return the number of appointments string ShowAppointment( int n); // if 0 <= n < numberAppointments // then return Appointment[n] // Otherwise return "Invalid Appointment Number" + n bool SetAppointment( string appt); // if numberAppointments < MAX_APPOINTMENTS // then add appt as Appointment[numberAppointments++] // return true // Otherwise return false. bool equals(Date N); // Suppose this is activated by a date object D as // D.equals(N). This returns true if and only if // D.JDN = N.JDN, bool lessThan(Date N); // returns true only if D.JDN < N.JDN bool greaterThan(Date N); // returns true only if D.JDN > N.JDN void mailAppointments( string subject, string sendTo ); // send the appointments for the object that activated this // method as email // parameters // subject holds the subject of the email sent // sendTo holds the email address that will receive the appointments // if there are no appointments then no email is sent, otherwise the // appointments are sent as one message private: float JDN; int numberAppointments; string appointments [MAX_APPOINTMENTS]; };