001package headfirst.composite.menuiterator;
002
003public class MenuTestDrive {
004        public static void main(String args[]) {
005
006                MenuComponent pancakeHouseMenu =
007                                new Menu("PANCAKE HOUSE MENU", "Breakfast");
008                MenuComponent dinerMenu =
009                                new Menu("DINER MENU", "Lunch");
010                MenuComponent cafeMenu =
011                                new Menu("CAFE MENU", "Dinner");
012                MenuComponent dessertMenu =
013                                new Menu("DESSERT MENU", "Dessert of course!");
014
015                MenuComponent allMenus = new Menu("ALL MENUS", "All menus combined");
016
017                allMenus.add(pancakeHouseMenu);
018                allMenus.add(dinerMenu);
019                allMenus.add(cafeMenu);
020
021                pancakeHouseMenu.add(new MenuItem(
022                                "K&B's Pancake Breakfast",
023                                "Pancakes with scrambled eggs, and toast",
024                                true,
025                                2.99));
026                pancakeHouseMenu.add(new MenuItem(
027                                "Regular Pancake Breakfast",
028                                "Pancakes with fried eggs, sausage",
029                                false,
030                                2.99));
031                pancakeHouseMenu.add(new MenuItem(
032                                "Blueberry Pancakes",
033                                "Pancakes made with fresh blueberries, and blueberry syrup",
034                                true,
035                                3.49));
036                pancakeHouseMenu.add(new MenuItem(
037                                "Waffles",
038                                "Waffles, with your choice of blueberries or strawberries",
039                                true,
040                                3.59));
041
042                dinerMenu.add(new MenuItem(
043                                "Vegetarian BLT",
044                                "(Fakin') Bacon with lettuce & tomato on whole wheat",
045                                true,
046                                2.99));
047                dinerMenu.add(new MenuItem(
048                                "BLT",
049                                "Bacon with lettuce & tomato on whole wheat",
050                                false,
051                                2.99));
052                dinerMenu.add(new MenuItem(
053                                "Soup of the day",
054                                "A bowl of the soup of the day, with a side of potato salad",
055                                false,
056                                3.29));
057                dinerMenu.add(new MenuItem(
058                                "Hotdog",
059                                "A hot dog, with saurkraut, relish, onions, topped with cheese",
060                                false,
061                                3.05));
062                dinerMenu.add(new MenuItem(
063                                "Steamed Veggies and Brown Rice",
064                                "A medly of steamed vegetables over brown rice",
065                                true,
066                                3.99));
067
068                dinerMenu.add(new MenuItem(
069                                "Pasta",
070                                "Spaghetti with Marinara Sauce, and a slice of sourdough bread",
071                                true,
072                                3.89));
073
074                dinerMenu.add(dessertMenu);
075
076                dessertMenu.add(new MenuItem(
077                                "Apple Pie",
078                                "Apple pie with a flakey crust, topped with vanilla icecream",
079                                true,
080                                1.59));
081                dessertMenu.add(new MenuItem(
082                                "Cheesecake",
083                                "Creamy New York cheesecake, with a chocolate graham crust",
084                                true,
085                                1.99));
086                dessertMenu.add(new MenuItem(
087                                "Sorbet",
088                                "A scoop of raspberry and a scoop of lime",
089                                true,
090                                1.89));
091
092                cafeMenu.add(new MenuItem(
093                                "Veggie Burger and Air Fries",
094                                "Veggie burger on a whole wheat bun, lettuce, tomato, and fries",
095                                true,
096                                3.99));
097                cafeMenu.add(new MenuItem(
098                                "Soup of the day",
099                                "A cup of the soup of the day, with a side salad",
100                                false,
101                                3.69));
102                cafeMenu.add(new MenuItem(
103                                "Burrito",
104                                "A large burrito, with whole pinto beans, salsa, guacamole",
105                                true,
106                                4.29));
107
108                Waitress waitress = new Waitress(allMenus);
109
110                waitress.printVegetarianMenu();
111
112        }
113}