public abstract decimal CalculateInterest(int monthsCount);
public double TotalInterestPaid() { double totalInterest = 0; for (int i = 0; i < accounts.Count; i++) { Account a = (Account)accounts[i]; if (a.CalculateInterest() > 0) { totalInterest += a.CalculateInterest(); } } return(totalInterest); }