001package headfirst.iterator.dinermergercafe; 002 003public class MenuTestDrive { 004 public static void main(String args[]) { 005 PancakeHouseMenu pancakeHouseMenu = new PancakeHouseMenu(); 006 DinerMenu dinerMenu = new DinerMenu(); 007 CafeMenu cafeMenu = new CafeMenu(); 008 009 Waitress waitress = new Waitress(pancakeHouseMenu, dinerMenu, cafeMenu); 010 011 waitress.printMenu(); 012 waitress.printVegetarianMenu(); 013 014 System.out.println("\nCustomer asks, is the Hotdog vegetarian?"); 015 System.out.print("Waitress says: "); 016 if (waitress.isItemVegetarian("Hotdog")) { 017 System.out.println("Yes"); 018 } else { 019 System.out.println("No"); 020 } 021 System.out.println("\nCustomer asks, are the Waffles vegetarian?"); 022 System.out.print("Waitress says: "); 023 if (waitress.isItemVegetarian("Waffles")) { 024 System.out.println("Yes"); 025 } else { 026 System.out.println("No"); 027 } 028 } 029}