// clock.cpp // Member function definitions for class Clock. #include using std::cout; using std::endl; #include "clock.h" Clock::Clock() // constructor : time( 0 ) { cout << "clock created" << endl; } Clock::~Clock() // destructor { cout << "clock destroyed" << endl; } void Clock::tick() // increment time by 1 { time++; } int Clock::getTime() const // return current time { return time; }