//---------------------------------------------------------------------------- // StackInterface.java by Dale/Joyce/Weems Appendix F // // Interface for a class that implements a stack. // A stack is a last in, first out structure. //---------------------------------------------------------------------------- public interface StackInterface { void pop() throws StackUnderflowException; // Throws StackUnderflowException if this stack is empty; // otherwise, removes top element from this stack. T top() throws StackUnderflowException; // Throws StackUnderflowException if this stack is empty; // otherwise, returns top element from this stack. boolean isEmpty(); // Returns true if this stack is empty; otherwise, returns false. }