//Header file derivedLinkedStack.h #ifndef H_derivedLinkedStack #define H_derivedLinkedStack #include #include "unorderedLinkedList.h" using namespace std; template class linkedStackType: public unorderedLinkedList { public: void initializeStack(); bool isEmptyStack() const; bool isFullStack() const; void push(const Type& newItem); Type top() const; void pop(); }; template void linkedStackType::initializeStack() { unorderedLinkedList::initializeList(); } template bool linkedStackType::isEmptyStack() const { return unorderedLinkedList::isEmptyList(); } template bool linkedStackType::isFullStack() const { return false; } template void linkedStackType::push(const Type& newElement) { unorderedLinkedList::insertFirst(newElement); } template Type linkedStackType::top() const { return unorderedLinkedList::front(); } template void linkedStackType::pop() { nodeType *temp; temp = first; first = first->link; delete temp; } #endif