Mortgage calculator modification


Question:

Mortgage Calculator Modification

Modify the mortgage program to display 3 mortgage loans: 7 year at 5.35%, 15 year at 5.5 %, and 30 year at 5.75%. Use an array for the different loans. Display the mortgage payment amount for each loan. 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. Do not use a graphical user interface. Insert comments in the program to document the program.

Please use the following to build upon

import java.io.*;
import java.util.Date;
import java.text.DecimalFormat;

public class Mortgage4
{
public static void main(String[] args)
{
Date currentDate = new Date(); //Date constructor
DecimalFormat decimalPlaces=new DecimalFormat("0.00");

//declaring variables
final double PRINCIPLE = 200000;
final double INTEREST = .0575;
final double TERM = 12*30;
final double MonthlyInterest = INTEREST/12;

//declaring variables
final double MONTHLY = (PRINCIPLE/ ((Math.pow((1 + MonthlyInterest), TERM) -1) / (MonthlyInterest * Math.pow((1 + MonthlyInterest), TERM))));
//displaying variables
System.out.println("tt" + currentDate);
System.out.println("ttPrinciple or Loan Amount: " + PRINCIPLE);
System.out.println("ttInterest Rate: " + INTEREST);
System.out.println("ttThe Term of Loan (in months): " + TERM);
System.out.println("ttThe Monthly Payment is: tiny_mce_markerquot; + decimalPlaces.format(MONTHLY));
//System.out.println(decimalPlaces.format(MONTHLY));

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Mortgage calculator modification
Reference No:- TGS01935105

Now Priced at $20 (50% Discount)

Recommended (93%)

Rated (4.5/5)