Exemplo n.º 1
0
 public Product(int code, string name, double price)
 {
     Code  = code;
     Name  = name;
     Price = new DollarAmount(price);
 }
Exemplo n.º 2
0
        public override string ToString()
        {
            DollarAmount subtotal = new DollarAmount(OrderProduct.Price.Amt * OrderAmt);

            return($"{OrderAmt} of Product {OrderProduct.Code} ({OrderProduct.Name}) for {subtotal}");
        }