1
0

mytime2.h 433 B

123456789101112131415161718192021
  1. // mytime2.h -- Time class after operator overloading
  2. #ifndef MYTIME2_H_
  3. #define MYTIME2_H_
  4. class Time
  5. {
  6. private:
  7. int hours;
  8. int minutes;
  9. public:
  10. Time();
  11. Time(int h, int m = 0);
  12. void AddMin(int m);
  13. void AddHr(int h);
  14. void Reset(int h = 0, int m = 0);
  15. Time operator+(const Time & t) const;
  16. Time operator-(const Time & t) const;
  17. Time operator*(double n) const;
  18. void Show() const;
  19. };
  20. #endif