1: // Filename: APPOINT.CPP 2: // Purpose: Implementation file corresponding to APPOINT.H. 4: #include <iostream> 5: using namespace std; 7: #include "APPOINT.H" 8: #include "PAUSE.H" 11: // Private members of class: 12: // string name; 13: // Time meetingTime; 16: //****************************************************************** 17: Appointment::Appointment(/* in */ string name, 18: /* in */ int hours, 19: /* in */ int minutes, 20: /* in */ int seconds) 21: :meetingTime(hours, minutes, seconds) 22: // Constructor 23: // Pre: "name" is assigned and 0 <= hours <= 23 24: // and 0 <= minutes <= 59 and 0 <= seconds <= 59 25: // Post: name == newName and hours == newHours 26: // and minutes == newMinutes and secs == newSeconds 27: { 28: this->name = name; 30: // cout << "Now in constructor for class Appointment ... \n"; 31: // Pause(0); cout << endl; 32: } 35: //****************************************************************** 36: void Appointment::Display() const 37: // Pre: self has been initialized. 38: // Post: Appointment information has been output in the form 39: // Meeting with: John Smith 40: // Meeting time: 08:14:25 41: { 42: cout << "Metting with: " << name << endl; 43: cout << "Meeting time: "; meetingTime.Display(); cout << endl; 44: }