public void PrintShoppingCart(ShoppingCart cart) { Console.WriteLine("Shopping Cart"); Console.WriteLine("-------------"); foreach (LineItem lineItem in cart.GetLineItems()) { Console.WriteLine("- {0}, Qty: {1}, Regular Price: ${2}", lineItem.Item.ItemName, lineItem.Quantity, String.Format("{0:0.00}",lineItem.PricePerUnit)); if (lineItem.Promotion != null) { Console.WriteLine(" Promotion Applied: {0}", lineItem.Promotion.GetPromotionDescription()); List<string> promotionText = lineItem.Promotion.GetPromotionText(lineItem); foreach (string textLine in promotionText) { Console.WriteLine(" {0}", textLine); } } Console.WriteLine(" Cost: ${0}", String.Format("{0:0.00}",lineItem.TotalCost)); } Console.WriteLine("-------------"); Console.WriteLine("Total Bill: ${0}", String.Format("{0:0.00}",cart.GetTotal())); }