/* * StackClient.java * * CS 112 - Lab 11 */ public class StackClient { public static void main(String[] args) { // Construct an LLStack of String objects. Stack s1 = new LLStack(); // Push the initial contents of the stack. // Note that we need to push them from bottom to top. s1.push("b"); s1.push("c"); s1.push("a"); s1.push("e"); s1.push("f"); System.out.println(s1); // Perform the sequence of modifications. s1.pop(); s1.push("x"); s1.push("w"); String str = s1.pop(); // no type cast is needed! s1.pop(); s1.push("z"); s1.push(str); System.out.println(s1); } }