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