Exemplo n.º 1
0
 public void AddToCart(AbstractProduct product, int quantity)
 {
     _cartProducts.Add(CartProductFactory.Create(product, quantity));
 }
Exemplo n.º 2
0
 public CartProduct(AbstractProduct prod, int quantity)
 {
     Product  = prod;
     Quantity = quantity;
     Subtotal = quantity * Product.ProductPrice;
 }
Exemplo n.º 3
0
 public static CartProduct Create(AbstractProduct product, int quantity)
 {
     return(new CartProduct(product, quantity));
 }