public override decimal InterestAmount(int numberOfMonths) { NegativeVerification.VerifyMonth(numberOfMonths); if (base.Balance < INDIVIDUAL_MIN_INTEREST_AMOUNT) { return(GlobalConstants.ZERO_INTEREST_AMOUNT); } else { return(((base.InterestRate / GlobalConstants.MAX_PERCENT) * base.Balance) * numberOfMonths); } }
public override decimal InterestAmount(int numberOfMonths) { NegativeVerification.VerifyMonth(numberOfMonths); if (base.Customer == CustomerType.Individual && numberOfMonths > INDIVIDUAL_MONTHS_WITHOUT_INTEREST) { return(((base.InterestRate / GlobalConstants.MAX_PERCENT) * base.Balance) * (numberOfMonths - INDIVIDUAL_MONTHS_WITHOUT_INTEREST)); } else if (base.Customer == CustomerType.Company && numberOfMonths > COMPANY_MONTHS_WITHOUT_INTEREST) { return(((base.InterestRate / GlobalConstants.MAX_PERCENT) * base.Balance) * (numberOfMonths - COMPANY_MONTHS_WITHOUT_INTEREST)); } else { return(GlobalConstants.ZERO_INTEREST_AMOUNT); } }
public void Deposit(decimal moneyToDeposit) { NegativeVerification.VerifyDeposit(moneyToDeposit); base.Balance += moneyToDeposit; }
public void Withdraw(decimal moneyToWithdraw) { NegativeVerification.VerifyWithdraw(moneyToWithdraw); base.Balance -= moneyToWithdraw; }