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) { PancakeHouseMenu pancakeMenu = new PancakeHouseMenu(); DinerMenu dinerMenu = new DinerMenu(); Waitress waitress = new Waitress(pancakeMenu, 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 pancakeHouseMenu = new PancakeHouseMenu(); DinerMenu dinerMenu = new DinerMenu(); Waitress waitress = new Waitress(pancakeHouseMenu,dinerMenu); waitress.printMenu(); Console.ReadLine(); }
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(); }
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 panCakeHouseMenu = new PanCakeHouseMenu(); DinerMenu dinerMenu = new DinerMenu(); IEnumerable <MenuPosition> panCakeHouseEnumerable = panCakeHouseMenu.GetEnumerable(); IEnumerable <MenuPosition> dinerMenuEnumerable = dinerMenu.GetEnumerable(); WriteMenu(panCakeHouseEnumerable); Console.WriteLine(); WriteMenu(dinerMenuEnumerable); Console.ReadKey(); }
static void Main(string[] args) { PanCakeHouseMenu panCakeHouseMenu = new PanCakeHouseMenu(); DinerMenu dinerMenu = new DinerMenu(); Iterator panCakeHouseIterator = panCakeHouseMenu.CreateIterator(); Iterator dinerMenuIterator = dinerMenu.CreateIterator(); WriteMenu(panCakeHouseIterator); Console.WriteLine(); WriteMenu(dinerMenuIterator); Console.ReadKey(); }
static void Main(string[] args) { //BreakFastMenu breakFastMenu = new BreakFastMenu(); //List<MenuItme> breakFastMenus = breakFastMenu.GetMenuItmes(); //DinerMenu dinerMenu = new DinerMenu(); //MenuItme[] dinerMenus = dinerMenu.GetMenuItmes(); ////打印早餐 //for (int i = 0; i < breakFastMenus.Count; i++) //{ // Console.WriteLine(breakFastMenus[i].Name); //} ////打印晚餐 //for (int i = 0; i < dinerMenus.Length; i++) //{ // Console.WriteLine(dinerMenus[i].Name); //} //BreakFastMenu breakFastMenu = new BreakFastMenu(); //Iterator iterator = breakFastMenu.CreateIterator(); //Console.WriteLine("--------早餐"); //while (iterator.HasNext()) //{ // //取得下一个项 // MenuItme menuItme = (MenuItme)iterator.Next(); // Console.WriteLine(menuItme.Name); //} //DinerMenu dinerMenu = new DinerMenu(); //iterator = dinerMenu.CreateIterator(); //Console.WriteLine("--------晚餐"); //while (iterator.HasNext()) //{ // //取得下一个项 // MenuItme menuItme = (MenuItme)iterator.Next(); // Console.WriteLine(menuItme.Name); //} BreakFastMenu breakFastMenu = new BreakFastMenu(); DinerMenu dinerMenu = new DinerMenu(); new NewMenu(breakFastMenu, dinerMenu).PrintMenu(); Console.ReadKey(); }
public Waitress(PancakeHouseMenu pancakeHouseMenu, DinerMenu dinerMenu) { this.pancakeHouseMenu = pancakeHouseMenu; this.dinerMenu = dinerMenu; }