// // timelist.h // // prevent multiple includes: #ifndef _TIMELIST_H #define _TIMELIST_H #include "time.h" class TimeList { public: TimeList() : count(0) { } // trivial; just put code here // add time T to end of list; PRE: list not full void add(Time* new_time); // return time at IX, crash if out-of-bounds Time* get(int ix) const; // return number of items in list int length() const { return count; } private: // bury details int count; // debugging trick: size first static constexpr int MAX = 100; // constants within class defs Time *items[MAX]; }; #endif