public QuickMeal PrepareVegMeal() { QuickMeal meal = new QuickMeal(); meal.AddItem(new VegBurger()); meal.AddItem(new Coke()); return(meal); }
public QuickMeal PrepareChickenMeal() { QuickMeal meal = new QuickMeal(); meal.AddItem(new ChickenBurger()); meal.AddItem(new Pepsi()); return(meal); }
static void Main(string[] args) { QuickMealBuilder mealBuilder = new QuickMealBuilder(); Console.WriteLine("-=-=-=-=-=-=-=-=-=-=-=-=-"); QuickMeal vegMeal = mealBuilder.PrepareVegMeal(); Console.WriteLine("Veg Meal"); vegMeal.ShowItems(); Console.WriteLine("Total Price:" + vegMeal.GetPrice()); Console.WriteLine("-=-=-=-=-=-=-=-=-=-=-=-=-"); QuickMeal chickenMeal = mealBuilder.PrepareChickenMeal(); Console.WriteLine("Chicken Meal"); chickenMeal.ShowItems(); Console.WriteLine("Total Price:" + chickenMeal.GetPrice()); Console.ReadLine(); }