Source of appoint.h


  1: // Filename: APPOINT.H
  2: // Purpose:  Specification file for an Appointment class.

  4: #ifndef APPOINT_H
  5: #define APPOINT_H

  7: #include <string>
  8: using namespace std;
  9: #include "TIME.H"


 12: class Appointment
 13: {
 14: public:

 16:     Appointment(/* in */ string name = "No name ...",
 17:                 /* in */ int  hours = 0,
 18:                 /* in */ int  minutes = 0,
 19:                 /* in */ int  seconds = 0);
 20:     // Constructor
 21:     // Pre:  "name" is assigned       and  0 <= hours <= 23
 22:     //       and  0 <= minutes <= 59  and  0 <= seconds <= 59
 23:     // Post: name == newName             and  hours == newHours
 24:     //       and  minutes == newMinutes  and  secs == newSeconds

 26:     void Display() const;
 27:     // Pre:  self has been initialized.
 28:     // Post: Appointment information has been output in the form
 29:     //       Meeting with: John Smith
 30:     //       Meeting time: 08:14:25


 33: private:

 35:     string name;
 36:     Time   meetingTime;
 37: };

 39: #endif