Explore BrainMass
Share

Explore BrainMass

    Java Program for a Mortgage Calculator

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Write the program in Java (with a graphical user interface) and have it calculate and display the mortgage payment amount from user input of the amount of the mortgage and the user's selection from a menu of available mortgage loans:

    - 7 years at 5.35%
    - 15 years at 5.5%
    - 30 years at 5.75%

    Use an array for the mortgage data for the different loans. Read the interest rates to fill the array from a sequential file. Display the mortgage payment amount followed by the loan balance and interest paid for each payment over the term of the loan. Add graphics in the form of a chart. Allow the user to loop back and enter a new amount and make a new selection or quit. Please insert comments in the program to document the program. I forgot to add the credit amount on the last post.

    © BrainMass Inc. brainmass.com October 10, 2019, 4:21 am ad1c9bdddf
    https://brainmass.com/computer-science/java/java-program-mortgage-calculator-457123

    Attachments

    Solution Preview

    Hi,

    I created a new class, ChartJPanel, to make a graph. It adds a graph panel above the text output panel. On the panel, it draws three lines. Red line is for loan ...

    Solution Summary

    I created a new class, ChartJPanel, to make a graph. It adds a graph panel above the text output panel. On the panel, it draws three lines. Red line is for loan balance over the terms of loan. Blue line is for monthly payment over the term. Green line is for interest paid over the term. I didn't know what kind of chart you wanted. So I simply draw lines on a graph. x-axis is for months and y-axis is for money. Select available mortgages from the menu and enter the loan amount. Then click Calculate button. It will make charts on the graph. It also reads in year/interest from the file "interestRate.txt". So you should put the source code and the text file in the same folder.

    $2.19