// // 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(const Time &T); // 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 enum { MAX = 100 }; // constants within class defs Time items[MAX]; }; #endif