import OOPLS.LeakyStack;

public class LeakyStackClient {
    static int[] a = {67, 93, 70, 12, 49, 34, 78, 55, 32, 88};
    public static void main(String args[]) {
        LeakyStack<Integer> s = new LeakyStack<Integer>(7);
        // The stack holds at most seven elements at any time.
        for (int i=0; i<a.length; ++i) s.push(a[i]);
        System.out.println("78 is number " + s.search(78)
            + " on the stack.");
        System.out.print("Top:");
        while (!s.empty()) {
            System.out.println("\t"+s.pop().intValue());
        }    
    }
}
