//---------------------------------------------------------------------------- // 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. // ajg version: format //---------------------------------------------------------------------------- package ch03.stacks; public interface StackInterface { // Throws StackUnderflowException if this stack is empty, // otherwise removes top element from this stack. void pop() throws StackUnderflowException; // Throws StackUnderflowException if this stack is empty, // otherwise returns top element from this stack. T top() throws StackUnderflowException; boolean isEmpty(); }