/*  Stack interface
 *  
 *  Class Name:     Stack
 *  Description:    Class of stack objects & its interface declared 
 *  Author:         Ng Woon Liam
 *  Language:       Java
 *  Date:           10/1/2001
 *       
 *  Public Methods: isEmpty()       Return true if empty; else false
 *                  top()           Return most recently inserted item
 *                  pop()           Remove most recently inserted item
 *                  topAndPop()     Return and remove most recent item      
 *                  push()          Insert x
 *                  makeEmpty()     Remove all items
 */

public interface Stack
{
    boolean isEmpty( );
    Object  top( )       throws Exception;
    void    pop( )       throws Exception;
    Object  topAndPop( ) throws Exception;
    void    push( Object x );
    void    makeEmpty( );
}
