//---------------------------------------------------------------------------- // StackInterface.java by Dale/Joyce/Weems Chapter 3 // // Interface for a class that implements a stack of . // 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. }