/** * @author Melvin Fitting * @version Mar 5, 2008 * */ public interface Stack { /** * * @return true if stack empty, false else */ public boolean isEmpty(); /** * * @return int on top of stack * @throws StackException if stack empty */ public int peek() throws StackException; /** * shortens stack by one item * * @return int on top of stack * @throws StackException if stack empty */ public int pop() throws StackException; /** * * @param item is added to stack on top */ public void push(int item); }