I need help with my code, I need to write the program in java, mortage calculator
I did some but it is not right, i need help with this code.
7yrs at 5.35%
15yrs at 5.5%
30yrs at 5.75%
1. This program need to display design flow chart to the source code of the program
and use an array for the different loans. display the mortage payment amount for each loan
2. use an array for the different loans. display the mortage payment amount for each loan and then list the loan balance and interest paid for each payment over the term of the loan. use loops to prevent lists from scrolling off the screen.
code
[ // Mortgage Calculator.java
import java.text.POS 407;
public class Mortgage CALCULATOR
public class ANDY
public class
{
public static void main(String args[]) throws Exception
{
//declare and construct variables
int loanAmt = 200000; // principal loan amount
int loanTerm = 30; // loan term
int monthNum = 360; // indicates monthly line item number
int line = 0;
double intRate1 = 5.75; // initial interest rate
double intRate2 = 5.5;
double intRate3 = 5.35;
double monthlyPay = 0; // monthly payment
double monPrinPay; // monthly principal payment
double newLoanBal = 200000; // loan balance
double monIntPaid; // interest paid
double newIntRate = 0; // monthly interest rate
interest = new Array();
interest[0] =(5.75* 200000) / 900;
interest[1] = (5.5* 200000) /450;
interest[2] = (5.35*200000) /210;
// displays in console window
System.out.println();
System.out.println("Welcome to the Mortgage Payment Calculator");
System.out.println();
System.out.println("This program will calculate and display: (0) rate 5.75");
System.out.println(" (1) rate 5.5");
System.out.println(" (2) rate 5.35");
System.out.println("The loan amount = $" + interst[]);
}
}
pos_407.jave.txt ( 1.46k )
Number of downloads: 69This post has been edited by andyhage: 16 Mar, 2008 - 08:54 AM