class Time
1: /** @file time.h
2: Specification file for a very simple Time class
3: to serve as base class for illustrating inheritance.
4: */
6: #ifndef TIME_H
7: #define TIME_H
9: class Time
10: {
11: public:
12: Time
13: (
14: int hours = 0, //in
15: int minutes = 0, //in
16: int seconds = 0 //in
17: );
19: Time
20: (
21: const Time& otherTime //in
22: );
24: ~Time();
25: //virtual ~Time();
27: void set
28: (
29: int hours = 0, //in
30: int minutes = 0, //in
31: int seconds = 0 //in
32: );
34: void increment();
36: void display() const;
37: //virtual void display() const;
40: protected:
41: int hours;
42: int minutes;
43: int seconds;
44: };
46: #endif