001package headfirst.composite.menu;
002
003public class MenuTestDrive {
004        public static void main(String args[]) {
005                MenuComponent pancakeHouseMenu =
006                                new Menu("PANCAKE HOUSE MENU", "Breakfast");
007                MenuComponent dinerMenu =
008                                new Menu("DINER MENU", "Lunch");
009                MenuComponent cafeMenu =
010                                new Menu("CAFE MENU", "Dinner");
011                MenuComponent dessertMenu =
012                                new Menu("DESSERT MENU", "Dessert of course!");
013                MenuComponent coffeeMenu = new Menu("COFFEE MENU", "Stuff to go with your afternoon coffee");
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                                "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
082                dessertMenu.add(new MenuItem(
083                                "Cheesecake",
084                                "Creamy New York cheesecake, with a chocolate graham crust",
085                                true,
086                                1.99));
087                dessertMenu.add(new MenuItem(
088                                "Sorbet",
089                                "A scoop of raspberry and a scoop of lime",
090                                true,
091                                1.89));
092
093                cafeMenu.add(new MenuItem(
094                                "Veggie Burger and Air Fries",
095                                "Veggie burger on a whole wheat bun, lettuce, tomato, and fries",
096                                true,
097                                3.99));
098                cafeMenu.add(new MenuItem(
099                                "Soup of the day",
100                                "A cup of the soup of the day, with a side salad",
101                                false,
102                                3.69));
103                cafeMenu.add(new MenuItem(
104                                "Burrito",
105                                "A large burrito, with whole pinto beans, salsa, guacamole",
106                                true,
107                                4.29));
108
109                cafeMenu.add(coffeeMenu);
110
111                coffeeMenu.add(new MenuItem(
112                                "Coffee Cake",
113                                "Crumbly cake topped with cinnamon and walnuts",
114                                true,
115                                1.59));
116                coffeeMenu.add(new MenuItem(
117                                "Bagel",
118                                "Flavors include sesame, poppyseed, cinnamon raisin, pumpkin",
119                                false,
120                                0.69));
121                coffeeMenu.add(new MenuItem(
122                                "Biscotti",
123                                "Three almond or hazelnut biscotti cookies",
124                                true,
125                                0.89));
126
127                Waitress waitress = new Waitress(allMenus);
128
129                waitress.printMenu();
130        }
131}