예제 #1
0
        public void Put(int balance)
        {
            Balance += balance;
            BankTransaction bt = new BankTransaction(balance);

            transactions.Enqueue(bt);
        }
예제 #2
0
 public void Take(int balance)
 {
     if (Balance >= balance)
     {
         Balance -= balance;
         BankTransaction bt = new BankTransaction(-balance);
         transactions.Enqueue(bt);
     }
 }