Purchase Solution

mortgage program to display 3 mortgage loans

Not what you're looking for?

Ask Custom Question

Looking for 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. Non-graphical user interface. Insert comments in the program to document the program.
Build on this if possible using an array:

import java.math.*;
import java.text.*;

//class BuyaHomeCalculator

class BuyaHomeCalculator {
public static void main(String arguments[]) {

//Program Variables
double term = 360;
double interestRate = 0.0575;
double loan = 200000;
double monthlyRate = (interestRate/12);

//Discount factor calculator
double discountFactor = (Math.pow((1 + monthlyRate), term) -1) / (monthlyRate * Math.pow((1 + monthlyRate), term));
double payment = loan / discountFactor;

DecimalFormat df = new DecimalFormat("$###,###.00");

//Output
System.out.println("The Loan amount is: $200,000");
System.out.println("The intrest rate is: 5.75%");
System.out.println("The term of the loan is: 30 years.");
System.out.println("Monthly Payment Amount: " + df.format(payment) );

}
}

Purchase this Solution

Solution Summary

This job models a mortgage program to display 3 mortgage loans.

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

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.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

C# variables and classes

This quiz contains questions about C# classes and variables.

C++ Operators

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