public decimal Deposit(decimal amount) { accBal += amount; BankTransaction tran = new BankTransaction(amount); tranQueue.Enqueue(tran); return(accBal); }
public bool Withdraw(decimal amount) { bool sufficientFunds = accBal >= amount; if (sufficientFunds) { accBal -= amount; BankTransaction tran = new BankTransaction(-amount); tranQueue.Enqueue(tran); } return(sufficientFunds); }