Hi all,
I am really really new at this Java stuff. I just started taking a Object Oriented programming class and need some help.
The problem i am working on consists of a 30 year mortgage and my output needs to show the monthly payments with the loan amount of 100,000 - 200,000 with increments of 20,000 dollars. The interest rate is 6% - 10% with increments of 0.5%. I also have no idea what to put to get an output because i keep getting errors since i know my code is wrong.
I am really new at this stuff and whatever guidance and explainations you can give me will help a ton!
This is all i have so far:
CODE
class mortgage
{
public static void main(String args[])
{
int Pa = (0);
double[] iRate= {0.060, 0.065, 0.070, 0.075, 0.080, 0.085, 0.090, 0.095, 0.100};//interest rates//
double amount[] = {100000, 120000, 140000, 160000, 180000, 200000};//*through $200,000(with increments of $20,000);
int PPy = 12;
int term= 30;//years for loan//
int x = (1 + iRate / 12);
Math.pow = (x,y);
Rate = AnnualiRate / PPy;//PPy is payments per year, this formula finds the real interest rate//
Pa = (amount * iRate) / (1 - Math.pow(1 + iRate, - (term*PPy)));
}
}