4
// include files used to obtain the current system time
7
//=========================================================
8
// ConcreteSubject class
12
// It is a ConcreteSubject class and is a child class of
15
// It is a time observer. Whenever member function Tick()
16
// is called. It obtains the current system
17
// time and store it as a character string. It called
18
// the update function for all of its observer objects.
20
//=========================================================
29
// normally we would get the real local system time here
34
// get hour (used by observer)
35
int GetHour() const { return _hour; }
36
// get minute (used by observer)
37
int GetMinute() const { return _min; }
38
// get second (used by observer)
39
int GetSecond() const { return _sec; }
41
void Tick(); // obtian system time (change state)