Пример #1
0
        public void PayInterest()
        {
            decimal interest = Balance >= MinBalForInterest ? Balance * InterestRate : 0M;

            if (interest > 0)
            {
                Deposit(interest);
            }
            AllAccounts.LogTransaction(this, interest, "Interest");
        }
Пример #2
0
 public void Withdraw(decimal amount)
 {
     if (Balance - amount >= 0)
     {
         Balance -= amount;
     }
     else
     {
         AllAccounts.LogTransaction(this, amount, "Withdrawal", "DECLINED");
     }
 }