Purchase Solution

Mortgage Calculator Modification

Not what you're looking for?

Ask Custom Question

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: $" + decimalPlaces.format(MONTHLY));
//System.out.println(decimalPlaces.format(MONTHLY));
}
}

Attachments
Purchase this Solution

Solution Summary

This solution provides a program that acts as a mortgage calculator.

Solution Preview

Hi,

Please see the file attached.

Thanks
Baseraj Mathew K

UPDATING:

Dear friend,

I have done the ...

Purchase this Solution


Free BrainMass Quizzes
C++ Operators

This quiz tests a student's knowledge about C++ operators.

Javscript Basics

Quiz on basics of javascript programming language.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Basic Networking Questions

This quiz consists of some basic networking questions.