The Test Code
import simplestack.SimpleStack;
import simplestack.StackOverflowException;
import simplestack.StackUnderflowException;
public class StackTest {
public static void main(String[] args) {
SimpleStack stack = new SimpleStack();
try {
for (int i = 0 ; i < SimpleStack.STKSIZE + 1 ; i++) {
stack.push(new Integer(i));
}
} catch (StackOverflowException e) {
System.out.println(e + "; stack top = " + stack.top());
}
for (int i = 0 ; i < SimpleStack.STKSIZE +1; i++) {
/* Add your stack pop here */
}
}
}