Пример #1
0
 public SavingsAccount(IInterestStrategy interestStrategy)
 {
     base.Transactions = new List<Transaction>();
     base.InterestStrategy = interestStrategy;
 }
Пример #2
0
 public void SetInterestStrategy(IInterestStrategy interestStrategy)
 {
     this.InterestStrategy = interestStrategy;
 }
Пример #3
0
 public virtual void AccrueInterest(IInterestStrategy interestStrategy)
 {
     this.AccountBalance += interestStrategy.CalculateInterest(this.AccountBalance);
 }