コード例 #1
0
ファイル: SavingsAccount.cs プロジェクト: zmosk/ABC-Bank
 public SavingsAccount(IInterestStrategy interestStrategy)
 {
     base.Transactions = new List<Transaction>();
     base.InterestStrategy = interestStrategy;
 }
コード例 #2
0
ファイル: AccountBase.cs プロジェクト: zmosk/ABC-Bank
 public void SetInterestStrategy(IInterestStrategy interestStrategy)
 {
     this.InterestStrategy = interestStrategy;
 }
コード例 #3
0
 public virtual void AccrueInterest(IInterestStrategy interestStrategy)
 {
     this.AccountBalance += interestStrategy.CalculateInterest(this.AccountBalance);
 }