// Test the Stack class that contains Person objects public class TestStack { public static void main(String[ ] args) { Stack s = new Stack( ); System.out.println(s.isEmpty( ) + " " + s.isFull( )); System.out.println("top == " + s.getTop( )); System.out.println(s); System.out.println( ); s.push(new Person("Alice", 'F', 23)); s.push(new Person("Larry", 'M', 29)); s.push(new Person("Susan", 'F', 31)); System.out.println("top == " + s.getTop( )); System.out.println(s.isEmpty( ) + " " + s.isFull( )); System.out.println(s); System.out.println( ); s.pop( ); s.pop( ); s.push(new Person("Shawn", 'M', 25)); System.out.println("top == " + s.getTop( )); System.out.println(s.isEmpty( ) + " " + s.isFull( )); System.out.println(s); System.out.println( ); s.pop( ); s.pop( ); System.out.println("top == " + s.getTop( )); System.out.println(s.isEmpty( ) + " " + s.isFull( )); System.out.println(s); System.out.println( ); } }