Purchase Solution

Java mortgage calculator: printing amortization table

Not what you're looking for?

Ask Custom Question

Modify the given Java Mortgage Calculator to print an Amortization Table for each of the three loans. It should pause briefly after each screen-full of lines (i.e. every 30 lines) before continuing, to allow the user to read the data.

Also provided are the formulas that need to be used, and the pseudo-code for the calculation process.

Purchase this Solution

Solution Summary

Since nothing is specified about the amortization table columns, the modified code prints "Month number", "Principal Payment", "Interest Payment", "Loan Balance" and "Principal Balance" columns, though all the information is computed as per the given "Mortgage Formulas.docx".

Solution Preview

Please find attached 292631-MortgagePayment.java that adds a function to your existing Java code to print amortization table, following the formulas provided by you. Rename it as MortgagePayment.java before attempting to compile and run it. This code sleeps for 5 seconds after every 30 lines of same table, and after completely printing the table if number of lines in table are not multiple of 30. Please adjust the pause timing to suit your need.

Since nothing is specified about the amortization table columns, this code prints "Month number", "Principal Payment", "Interest Payment", "Loan Balance" and "Principal Balance" columns, though all the information is computed as per your "Mortgage Formulas.docx". I hope you can easily add/change columns in printed table to meet your requirement.

import java.text.DecimalFormat;

public class MortgagePayment {
private int principle;
private int notePeriod;
private float interestRate;

/**
* Constructor for Mortgage Payment
*
* @param principle
* - loan principle
* @param notePeriod
* - number of months ...

Purchase this Solution


Free BrainMass Quizzes
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.

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.

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.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

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.