示例#1
0
        public void Purchase(VM_Item item)
        {
            item.QuantityRemaining--;
            item.QuantitySold++;
            currentBalance -= item.Price;
            totalSales     += item.Price;

            TxWriter.Audit(item);
        }
示例#2
0
        public Change ReturnChange()
        {
            Change changeRetured = new Change((int)(currentBalance * 100), quartersRemaining, dimesRemaining, nickelsRemaining);

            TxWriter.Audit(currentBalance);
            currentBalance     = 0.00;
            quartersRemaining -= changeRetured.Quarters;
            dimesRemaining    -= changeRetured.Dimes;
            nickelsRemaining  -= changeRetured.Nickels;
            return(changeRetured);
        }