private static void MenuTestDrive() { var pancakeHouseMenu = new PancakeHouseMenu(); var dinerMenu = new DinerMenu(); var waitress = new Waitress.Waitress(pancakeHouseMenu, dinerMenu); waitress.PrintMenu(); }
static void Main(string[] args) { DinerMenu dinerMenu = new DinerMenu(); PancakeHouseMenu pancakeHouseMenu = new PancakeHouseMenu(); PrintMenu(dinerMenu.createIterator()); Console.WriteLine(); PrintMenu(pancakeHouseMenu.createIterator()); }
static void Main(string[] args) { PancakeHouseMenu pancakeMenu = new PancakeHouseMenu(); DinerMenu dinerMenu = new DinerMenu(); Waitress waitress = new Waitress(pancakeMenu, dinerMenu); waitress.printMenu(); }
static void Main(string[] args) { PancakeHouseMenu pancakeHouseMenu = new PancakeHouseMenu(); DinerMenu dinerMenu = new DinerMenu(); Waitress waitress = new Waitress(pancakeHouseMenu,dinerMenu); waitress.printMenu(); Console.ReadLine(); }
static void Main(string[] args) { var pancakeMenu = new PancakeHouseMenu(); var dinnerMenu = new DinnerMenu(); var cafeMenu = new CafeMenu(); var waitress = new Waitress(pancakeMenu, dinnerMenu, cafeMenu); waitress.PrintMenu(); }
static void Main(string[] args) { Console.WriteLine("Hello World!"); IEnumerable <MenuItem> pancakeHouseMenu = new PancakeHouseMenu(); IEnumerable <MenuItem> dinerMenu = new DinerMenu(); IEnumerable <MenuItem> cafeMenu = new CafeMenu(); var waitress = new Waitress(new [] { pancakeHouseMenu, dinerMenu, cafeMenu }); waitress.PrintMenu(); }
static void Main(string[] args) { PancakeHouseMenu pancakeHouseMenu = new PancakeHouseMenu(); DinnerMenu dinnerMenu = new DinnerMenu(); Waitress waitress = new Waitress(pancakeHouseMenu, dinnerMenu); waitress.PrintMenu(); Console.ReadLine(); }
public static int Main() { DinerMenu dinerMenu = new DinerMenu(); PancakeHouseMenu pancakeMenu = new PancakeHouseMenu(); CafeMenu cafeMenu = new CafeMenu(); Console.WriteLine("Start Test!"); Waitress waitress = new Waitress(dinerMenu, pancakeMenu, cafeMenu); waitress.PrintMenu(); Console.WriteLine("Test finished!"); return 0; }
static void MenuTestDriveUsingIEnumerator() { var pancakeHouseMenu = new PancakeHouseMenu(); var dinerMenu = new DinerMenu(); var cafeMenu = new CafeMenu(); var waitress = new Waitress(new ArrayList(3) { pancakeHouseMenu, dinerMenu, cafeMenu }); waitress.PrintMenu(); }
static void Main(string[] args) { PancakeHouseMenu pancakeMenu = new PancakeHouseMenu(); DinnerMenu dinnerMenu = new DinnerMenu(); #region Bad implementation of PrintMenu() method //List<MenuItem> breakfastItems = pancakeMenu.MenuItems; // waitress is dependent on type List<MenuItem> //MenuItem[] dinnerItems = dinnerMenu.MenuItems; // waitress is also dependent on type MenuItem[] //foreach (var menuItem in breakfastItems) //{ // Console.WriteLine(menuItem.Name); // Console.WriteLine(menuItem.Price); // Console.WriteLine(menuItem.Description); //} //foreach (var menuItem in dinnerItems) //{ // Console.WriteLine(menuItem.Name); // Console.WriteLine(menuItem.Price); // Console.WriteLine(menuItem.Description); //} #endregion IIterator <MenuItem> pancakeIterator = pancakeMenu.CreateIterator(); IIterator <MenuItem> dinnerIterator = dinnerMenu.CreateIterator(); Console.WriteLine("---Menu---"); Console.WriteLine(); Console.WriteLine("--Breakfast--"); PrintMenu(pancakeIterator); Console.WriteLine(); Console.WriteLine("--Lunch--"); PrintMenu(dinnerIterator); }
public Waitress(PancakeHouseMenu pancakeHouseMenu, DinerMenu dinerMenu) { this.pancakeHouseMenu = pancakeHouseMenu; this.dinerMenu = dinerMenu; }
public Waitress(PancakeHouseMenu pancakeHouseMenu, DinnerMenu dinnerMenu) { this.pancakeHouseMenu = pancakeHouseMenu; this.dinerMenu = dinnerMenu; }
public Waitress(PancakeHouseMenu pancakeHouseMenu, DinnerMenu dinnerMenu, CafeMenu cafeMenu) { _pancakeHouseMenu = pancakeHouseMenu; _dinnerMenu = dinnerMenu; _cafeMenu = cafeMenu; }