This applet uses a Stack class that I wrote. The stack is a useful
data structure that is used in a wide variety of areas in Computer
Science. The stack has two basic operations; push(),
which adds an element to the top of the stack, and pop(),
which removes the topmost element from the stack and returns it. Simple,
but surprisingly useful. This implementation of the stack abstract data
type handles data of type Object, which means that you can push or pop
anything that inherits from type object (i.e. almost anything in the Java
language, except for primitive numeric types).
Another interesting thing about this applet: it creates a new Exception,
which is thrown if the user tries to pop from an empty stack.
Source for the Applet
Source for the Stack class
Source for the StackEmptyException class