public void shoppercar_80off() { var product = new Product(100, 50); var shoppingCar = new ShoppingCar(new Price80Off()); shoppingCar.Counting(product); shoppingCar = new ShoppingCar(new Price60Off()); shoppingCar.Counting(product); shoppingCar = new ShoppingCar(new Price70Off()); shoppingCar.Counting(product); }
public void shoppercar_50off() { var product = new Product(100, 50); Console.WriteLine(ShoppingCar.counting2(product, 0.5m)); }