Purchase Solution

Mortgage Calculator Separate Methods

Not what you're looking for?

Ask Custom Question

I am not sure how to do this, attached is the program
Also I need a flowchart diagram of the program.

NO ACTIONS IN MAIN. Thus, the code The entire for loop) below should be in a separate method:

for (loan = 200000, i=0;i<terms.length;i++){
//Calculates the Payment per month to be paid under mortgage scheme One
interestRate=Rates; //take value from the array Rates[] to a temporary variable
term=terms; //take value from the array terms[] to a temporary variable
double monthlyRate = (interestRate/12); //derive the monthly interest rate
//calculate the discount factor
// MonthlyPayment = LoanAmount*Math.pow(1+MonthlyInterestRate, Period)*MonthlyInterestRate/(Math.pow(1+MonthlyInterestRate, Period) -1);

double discountFactor = (Math.pow((1 + monthlyRate), term) -1) / (monthlyRate * Math.pow((1 + monthlyRate), term));
double payment1 = loan / discountFactor; //calculate payable amount per month
//Output for mortage scheme One
System.out.println("The Loan amount is:"+df.format(loan)+"n");
System.out.println("The intrest rate is:"+interestRate*100+"%");
System.out.println("The term of the loan is:"+term/12+" years.");

//display the balance in pausable list
showBalance(term, monthlyRate, loan, payment1);
}

Purchase this Solution

Solution Summary

The expert examines separate methods for mortgage calculators.

Purchase this Solution


Free BrainMass Quizzes
Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

C++ Operators

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

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.

Javscript Basics

Quiz on basics of javascript programming language.

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.