public SavingsAccount(IInterestStrategy interestStrategy) { base.Transactions = new List<Transaction>(); base.InterestStrategy = interestStrategy; }
public void SetInterestStrategy(IInterestStrategy interestStrategy) { this.InterestStrategy = interestStrategy; }
public virtual void AccrueInterest(IInterestStrategy interestStrategy) { this.AccountBalance += interestStrategy.CalculateInterest(this.AccountBalance); }