Hi there everyone,

I need some help getting started creating a Java program for a class I am taking.

Here is what I need to do:

Create A program written in Java (without a graphical user interface) that will calculate and display the monthly payment amount to fully amortize a $200,000.00 loan over a 30 year term at 5.75‰ interest

I don't even know where to begin with this.

I am using JDK 6 Update 23 and we are required to use Text Pad for the class to write our coding.

Thanks in advance for any help.

IKE

public class Main {


    public static void main(String[] args) {
             double initialAmount= 200000.00;

        double totalDue=   (200000.00)*(0.0575)*(30)+ initialAmount;

        double monthlyRate= totalDue/360;

        System.out.println(monthlyRate);

    }

}

The Java works, but the result is incorrect.

The monthly payment should be $1167.15.
I don't know how to make the formula work to get the correct results.

IKE

public class Loan {

    public static void main(String[] args) {
    	double initialAmount= 200000.00;
    	double MonthlyRate = initialAmount * ((0.0575 * Math.pow(1+0.0575,360)) / ( Math.pow(1+0.0575,360)-1));
    	System.out.println(monthlyRate);
    }
}

I got 11500.000020881538.

I used the formula from http://en.wikipedia.org/wiki/Amortization_calculator

I am not sure about the formula from Wikipedia, but I used
3 different online mortgage calculators and they all came up with the same answer for the payment. $1167.15

Remember this is a fixed 5.75% over 30 years on 200,000.

Thanks again for any help.

Edited 5 Years Ago by Coyboss: n/a

hmmm...does the interest apply once to the initial payment and THAT is the amount that is distributed monthly over 30 years?

or

does the interest re-apply every year...because the amount that you owe is reduced every year

if the interest is re-applied...that could make a HUGE difference

Hi Newbie.

NOt exactly sure how all that works.

I am assuming for the purposes of the exercise, that the rate is fixed and is based on the principal at start of the loan.

IKE

This article has been dead for over six months. Start a new discussion instead.