/******************************************************************************************** example 9 -- clocktime.h making military time into clocktime ********************************************************************************************/ #include <iostream> using namespace std; //class definition class clocktime { private: int hour; // 0-23 int minute; // 0-59 int second; // 0-59 static bool AMPM; public: clocktime(const int h=0, const int m=0, const int s=0); //constructor with inits void print(ostream& out = cout) const; void addHour(const int h); void addMinute(const int m); void addSecond(const int s); void addSame(const clocktime& mt); clocktime operator+(const clocktime& mt) const; friend ostream& operator<<(ostream& out, const clocktime& mt); void show24H(const bool& set = true); void showAMPM(const bool& set = true); };