public interface Stack<E> {
    /**
     * Add o to the top of this stack.
     * Precondition: ! isFull() -- that is, the stack is not full.
     * @param o  the element to be pushed
     */
  void push(E o);

    /**
     * Remove and return the top element of this stack.
     * Precondition: ! isEmpty() -- that is, the stack is not empty.
     * @return  the (former) top element
     */
  E pop();

    /**
     * Return whether this stack is empty.
     * @return  true or false depending on whether the stack is empty
     */
  boolean isEmpty();

    /**
     * Return whether this stack is full.
     * This method may always return false in some implementations.
     * @return  true or false depending on whether the stack is full
     */
  boolean isFull();
}

