Source of rem1.h


  1: // Filename: REM1.H
  2: // Purpose:  Specification file for Reminder class implemented in REM1.CPP.

  4: #ifndef REM1_H
  5: #define REM1_H

  7: class Reminder
  8: {
  9: public:

 11:     Reminder(/* in */ int date = 19700101,
 12:              /* in */ const char* messageString = "No message");
 13:     // An alternate, equivalent, header for this constructor is:
 14:     // Reminder(/* in */ int date = 19700101,
 15:     //          /* in */ const char messageString[] = "No message");
 16:     // Constructor
 17:     // Pre:  19700101 <= date <= 29990101, and
 18:     //       messageString has been initialized.
 19:     // Post: A new class object has been constructed,
 20:     //       having the input date and messageString.

 22:     void Display() const;
 23:     // Pre:  self is initialized.
 24:     // Post: Date and message have been output in the (typical) form:
 25:     //       April 20, 1944
 26:     //       This is somebody's birthday.
 27:     //       in which the name of the month is displayed as a string, and
 28:     //       the message string is displayed on the line beneath the date.


 31: private:

 33:     int   date;
 34:     char* messagePtr;
 35: };

 37: #endif