示例#1
0
        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);
            }
        }
示例#2
0
        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);
            }
        }
示例#3
0
 public void Deposit(decimal moneyToDeposit)
 {
     NegativeVerification.VerifyDeposit(moneyToDeposit);
     base.Balance += moneyToDeposit;
 }
示例#4
0
 public void Withdraw(decimal moneyToWithdraw)
 {
     NegativeVerification.VerifyWithdraw(moneyToWithdraw);
     base.Balance -= moneyToWithdraw;
 }