static void Main() { StackImpl1 stacy = new StackImpl1(); stacy.howMany(); stacy.pushStack("Stella"); stacy.pushStack("was"); stacy.pushStack("a"); stacy.pushStack("Diver"); stacy.pushStack("and"); stacy.pushStack("she"); stacy.pushStack("was"); stacy.pushStack("always"); stacy.pushStack("down"); stacy.howMany(); stacy.popStack(); stacy.howMany(); }
static void Main() { StackImpl1 stacy = new StackImpl1(); Observer StackObserver1 = new Observer(); Observer StackObserver2 = new Observer(); stacy.attach(StackObserver1); stacy.attach(StackObserver2); stacy.howMany(); stacy.pushStack("Stella"); stacy.pushStack("was"); stacy.pushStack("a"); stacy.pushStack("Diver"); stacy.pushStack("and"); stacy.pushStack("she"); stacy.pushStack("was"); stacy.pushStack("always"); stacy.pushStack("down"); stacy.howMany(); stacy.popStack(); stacy.howMany(); }