#ifndef QUEUELIST_H_ #define QUEUELIST_H_ #include "list.h" #include "magicqueue.h" template <typename T> class QueueList : public List<T> { private: MagicQueue <T> values; public: QueueList(); ~QueueList(); void insertAtHead(T item); void insertAtTail(T item); int getSize(); bool isEmpty(); // ... etc. All List methods are declared here }; #include "queuelist.inl" #endif
Using the above declarations, complete an implementation for the methods getSize(),insertAtHead(T item), and removeTail(). Your answers should be written as they would appear in queuelist.inl, paying attention to the scope and template operators. Once complete, describe the O() of each of your implementations. Again, the details of MagicQueue are not important; you should assume it implements a Queue interface properly in O(1) time.