//BetterTime.h // //!! marks lines or sections that are new //!! // For multiple files, so only declared once #ifndef BETTERTIME_H #define BETTERTIME_H class Time { public: //use default constructors and //destructors //accessors bool Set12(int hr, int min, char ap); //returns false if an invalid time //is entered //noon is 12:00 am, //midnight is 12:00 pm. bool Set24(int hr, int min); //returns false if an invalid time //is entered //noon is 12:00, midnight is 00:00. int GetMinutes(); int GetHour12(); int GetHour24(); char GetAMPM(); //other methods void Display12(); void Display24(); //!! ----------- //prototypes of operations for the time class. //prefix increment operator, // that is ++t Time operator++(); //subtracts the right Time from the calling Time, returning the resulting time of day. Time operator-(Time right); bool operator==(Time right); bool operator!=(Time right); //!! ----------- private: int hour; //stored on 24 hour clock int minute; }; //end of time class //!! marks end of #ifndef #endif