@Override
    public boolean calculateMortgage() {

        // Assume false return value, only set to true when we have the right value.
        boolean retValue = false;

        if (fixedMonthlyPayment.equals(INITIAL_PAYMENT_AMT)) {
            //P = L[c(1 + c)^n]/[(1 + c)^n - 1]
            // P = Fixed monthly payment
            // n = months
            // c = monthly interest rate of (for 6% it is .06/12)
            // L = Original loan amount
            // source http://homeguides.sfgate.com/calculate-principal-interest-mortgage-2409.html

            Double onePlusCRaisedN = Math.pow(1 + interestRate.getMonthlyInterest(), loanDuration.getDurationInMonths());
            Double numerator = (interestRate.getMonthlyInterest() * onePlusCRaisedN) * loanAmount;
            Double denominator = onePlusCRaisedN - 1;

            if (denominator != 0) {

                // Round to 2 decimal places.
                fixedMonthlyPayment = numerator / denominator;

                retValue = true;
            } else {
                fixedMonthlyPayment = INVALID_PAYMENT_AMT;
                System.out.println("Invalid denominator, will get divide by 0 error.");
                throw new RuntimeException("Cant calculate payment with current input.");
            }
        }
        return retValue;
    }