static void RunTest() { 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(); }
public static void Main(string[] args) { PancakeHouseMenu pancakeHouseMenu = new PancakeHouseMenu(); DinerMenu dinerMenu = new DinerMenu(); Waitress waitress = new Waitress(pancakeHouseMenu, dinerMenu); // Without iterators //printMenu(); // With iterators waitress.PrintMenu(); }
static void Main(string[] args) { PancakeHouseMenu pancakeHouseMenu = new PancakeHouseMenu(); DinerMenu dinerMenu = new DinerMenu(); CafeMenu cafeMenu = new CafeMenu(); Waitress waitress = new Waitress(new List <IMenu> { pancakeHouseMenu, dinerMenu, cafeMenu }); waitress.PrintMenu(); Console.ReadKey(); }
public Waitress(PancakeHouseMenu pancakeHouseMenu, DinerMenu dinerMenu, CafeMenu cafeMenu) { this.pancakeHouseMenu = pancakeHouseMenu; this.dinerMenu = dinerMenu; this.cafeMenu = cafeMenu; }
public Waitress(PancakeHouseMenu _pancakeHouseMenu, DinerMenu _dinerMenu) { pancakeHouseMenu = _pancakeHouseMenu; dinerMenu = _dinerMenu; }