001package headfirst.factory.pizzaaf; 002 003public class PizzaTestDrive { 004 005 public static void main(String[] args) { 006 PizzaStore nyStore = new NYPizzaStore(); 007 PizzaStore chicagoStore = new ChicagoPizzaStore(); 008 009 Pizza pizza = nyStore.orderPizza("cheese"); 010 System.out.println("Ethan ordered a " + pizza + "\n"); 011 012 pizza = chicagoStore.orderPizza("cheese"); 013 System.out.println("Joel ordered a " + pizza + "\n"); 014 015 pizza = nyStore.orderPizza("clam"); 016 System.out.println("Ethan ordered a " + pizza + "\n"); 017 018 pizza = chicagoStore.orderPizza("clam"); 019 System.out.println("Joel ordered a " + pizza + "\n"); 020 021 pizza = nyStore.orderPizza("pepperoni"); 022 System.out.println("Ethan ordered a " + pizza + "\n"); 023 024 pizza = chicagoStore.orderPizza("pepperoni"); 025 System.out.println("Joel ordered a " + pizza + "\n"); 026 027 pizza = nyStore.orderPizza("veggie"); 028 System.out.println("Ethan ordered a " + pizza + "\n"); 029 030 pizza = chicagoStore.orderPizza("veggie"); 031 System.out.println("Joel ordered a " + pizza + "\n"); 032 } 033}