"StackInterface.h(textbook)" By Silver_Smoulder (https://pastebin.com/u/Silver_Smoulder) URL: https://pastebin.com/2k6rVqaj Created on: Wednesday 10th of April 2019 01:52:20 PM CDT Retrieved on: Saturday 24 of October 2020 11:38:43 PM UTC /** @file StackInterface.h */ #ifndef _STACK_INTERFACE #define _STACK_INTERFACE template class StackInterface { public: /** Sees whether this stack is empty. @return True if the stack is empty, or false if not. */ virtual bool isEmpty() const = 0; /** Adds a new entry to the top of this stack. @post If the operation was successful, newEntry is at the top of the stack. @param newEntry The object to be added as a new entry. @return True if the addition is successful or false if not. */ virtual bool push(const ItemType& newEntry) = 0; /** Removes the top of this stack. @post If the operation was successful, the top of the stack has been removed. @return True if the removal is successful or false if not. */ virtual bool pop() = 0; /** Returns the top of this stack. @pre The stack is not empty. @post The top of the stack has been returned, and the stack is unchanged. @return The top of the stack. */ virtual ItemType peek() const = 0; }; // end StackInterface #endif