private void PrepareOrder(Order order) { var cooker = new CookingService(); foreach (var item in order.Items) { item.MenuItem = cooker.Prepare(item.ItemId); } }
private void PrepareOrder(Order order) { var cooker = new CookingService(); foreach (var item in order.Items) { cooker.Prepare(item.ItemId, item.Quantity); } }
public void ExecuteOrder(Order order, PaymentDetails paymentDetails, bool printReceipt) { order.CalculateAmount(); paymentService.Charge(paymentDetails, order); cookingService.Prepare(order); if (printReceipt) { printer.PrintReceipt(order); } }