Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Your project as a programming consultant is to create a program that develops an amortization schedule.  Your program should be written as a Java applet.  As an applet, your program will be executed through the use of a browser.  Your applet should prompt the user for three different inputs, loan amount, the duration of the loan and the annual interest rate.  Your task is to create a Java applet that provides the user with a payment schedule, or amortization schedule.  The schedule must include monthly payment amount, interest amount, principal amount and the remaining balance per pay period.  The amortization table must be presented to the user in a nicely formatted table.

The applet input will be the loan amount, annual percentage rate (APR), and the number of years to pay out the loan. The output will be the loan amount, interest rate per pay period number of pay periods and the monthly payment. This information would be followed by the amortization schedule. Following is an example of the expected output for a $35,000 loan over 8 years at 8.5% interest rate.

Loan Amount: $35,000

Interest Rate per pay period: 0.085

Pay Periods: 96

Monthly Payment Amount: $503.72

Payment     Monthly Amount        Interest      Principal     Balance

                                                                                     35,000.00

1                              503.72        247.92       255.80     34,744.20

2                              503.72        246.10       257.62     34,486.58

3                              503.72        244.28       259.44     33,965.86

....

95                            503.72            7.07       496.65          500.78

96                            503.72            3.55       500.17              0.61

The necessary calculations are below:

p, loan amount or principal

n, number of payments = payments per year * number of years

i, interest rate per pay period = APR/payments per year = APR/12

t, interest paid = interest rate per pay period * previous principal balance

r, monthly payment amount = principal * interest per period / (1-(1+(interest per period)/100)^(number of payments-1)^2)

a, principle amount = monthly payment amount - interest paid

b, principle balance = previous balance - principle amount

Hint: In Java syntax the monthly payment calculation is:

r=((p*(i/100))/(1-(Math.pow((1+(i/100)),(n*(-1))))));

Details:

Please note that your program should accept three inputs:

    The loan amount,

    Annual Percentage Rate, and

    The number of years to pay out the loan

And calculate six types of outputs:

    The monthly payment amount,

    Interest per pay period,

    Number of pay periods,

    Amortization schedule (including amount of interest per pay period, principal per pay period, and principle balance)

When coding your applet, remember the following:

    Your applet needs to extend the Applet (or JApplet) class. Of course, you need to import the appropriate applet package(s).

    Your applet needs to have declarations for the fields, labels, components, widgets, and so forth that you use in the applet.

    There are applet methods that are called automatically by browsers (please see your textbook). Make sure you initialize (implement init()) your applet.

    You need the code that does the calculation of the interest.

    You need to handle the event of pressing the button. There are some examples in the book (ask your instructor for the specific pages).

    You may use this sample code for example.

Please create an HTML page that contains the applet tag. In addition to your mortgage calculator commented Java code, you need to provide the HTML page.

Here is the Hello world Java code example to create an applet:

importjava.applet.*;

importjava.awt.*;

/**

* The HelloWorld class implements anapplet that

* simply displays "HelloWorld!".

*/

public class HelloWorld extends Applet {

public void paint(Graphics g){

// Display "Hello World!"

g.drawString("Hello world!",50, 25);

}

}

Then you would compile the class and create an HTML page called Hello.htm:

A Simple Program.

Here is the output of my program:

Java, Programming

  • Category:- Java
  • Reference No.:- M9750497

Have any Question?


Related Questions in Java

Simple order processing systemquestion given the classes

Simple Order Processing System Question: Given the classes Ship (with getter and setter), Speedboat, and SpeedboatTest. Answer the following questions: Refine the whole application (all classes) and create Abstract class ...

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

Solving 2nd degree equationsbull write the following java

Solving 2nd degree equations • Write the following Java methods • boolean real-sols(double a, double b, double c): it returns true if the 2nd degree equation ax2 + bx + c has real solutions • double solution1(double a, d ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

In ruby the hash class inherits from enumerable suggesting

In Ruby, the Hash class inherits from Enumerable, suggesting to a programmer that Hashes are collections. In Java, however, the Map classes are not part of the JCF (Java Collections Framework). For each language, provide ...

Assignment - java program using array of objectsobjectives

Assignment - JAVA Program using array of objects Objectives - This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details - For this assignment, you are required to develop a Menu ...

Project requirementsfor the problem described in the next

Project requirements For the problem described in the next section, you must do the following: 1. include your student ID at the end of all filenames for all java code files. Three classes have been identified in section ...

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As