class Date
1: // Filename: DATE1.H
2: // Purpose: Specification file for a simple Date class.
4: class Date
5: {
6: public:
7: Date(/* in */ int newMonth,
8: /* in */ int newDay,
9: /* in */ int newYear,
10: /* in */ const char* messageString);
11: // Constructor
12: // Pre: 1 <= newMonth <= 12
13: // and 1 <= newDay <= maximum number of days in newMonth
14: // and 1970 <= newYear
15: // and messageString is initialized
16: // Post: New class object is constructed with a date of newMonth,
17: // newDay, newYear and the message string in messageString.
19: void Display() const;
20: // Pre: self is initialized.
21: // Post: Date and message have been output in the form
22: // month day, year message
23: // in which the name of the month is displayed as a string,
24: // and the message string is displayed on the line beneath
25: // the date.
27: private:
28: int day;
29: int month;
30: int year;
31: char* messagePtr;
32: };