// List.h Wed Jan 29 16:59:19 PST 2003 #ifndef LIST_H #define LIST_H // a list of integers, initialized to be the empty list // traversal can begin only at the front of the list // reset() causes all items to become unvisited // hasNext() returns true if not all items have been visited // next() visits the first unvisited item in the list, and returns its value // append(n) increments the list by appending n to the tail of the list // printAll() outputs the list items in order class List { public: virtual void reset() = 0; virtual bool hasNext() = 0; virtual int next() = 0; virtual void append(int n) = 0; void printAll(); }; #endif