Source of time.h


  1: // Filename: TIME.H
  2: // Purpose:  Specification file for a very simple Time class
  3: //           to serve as base class for illustrating inheritance.

  5: #ifndef TIME_H
  6: #define TIME_H

  8: class Time
  9: {
 10: public:

 12:     Time(/* in */ int hours = 0,
 13:          /* in */ int minutes = 0,
 14:          /* in */ int seconds = 0);
 15:     void Set(/* in */ int hours = 0,
 16:              /* in */ int minutes = 0,
 17:              /* in */ int seconds = 0);
 18:     void Increment();
 19:     void Display() const;


 22: private:

 24:     int hours;
 25:     int minutes;
 26:     int seconds;
 27: };

 29: #endif