public CashRegister(string state) { _state = state; _checkout_products = new List<Product>(); _total = null; _creditCardService = new CreditCardService(); }
public CheckoutTotal CheckOut() { var preTaxTotal = _checkout_products.Sum(p => p.Price); _total = new CheckoutTotal(preTaxTotal); _total.CalculateTax(_state); return _total; }
public Receipt(IEnumerable<Product> products, CheckoutTotal total) { _products = products; _total = total; }