Checkout
checkout
view
Your Cart Your Cart: item(s)
Add to Shopping Cart
$2.19 Instant Download
Computer Science, Software Design and Architecture
Other

Java Applet


Your team has been hired as a Java programmer by Real Estates Solutions Inc. Your task is to write a Java applet for their web site that would enable customers to figure out their monthly mortgage payments.

The applet input will be the loan amount, annual percentage rate or APR, and the number of years to pay out the loan. The output will be: the monthly payment amount, the number of payments, the total paid including interest, and total interest paid.

The calculations were provided to you by a real estate agent:

p, loan amount or principal
n, number of payments = payments per year * number of years
i, interest per period = apr/payments per year = apr/12
r, monthly payment amount = principal * interest per period / (1-(1+(interest per period)/100)^(number of payments-1)^2)
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 or APR, and
The number of years to pay out the loan
And calculate four outputs:

The monthly payment amount,
Number of payments,
The total paid including interest, and
Total interest paid

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, etc. that you use in the applet.
There are applet methods that are called automatically by browsers. 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.
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 an example given to me from a facilitator to create an applet:


--------------------------------------------------------------------------------

mport java.applet.*;
   import java.awt.*;
/**
* The HelloWorld class implements an applet that
* simply displays "Hello World!".
*/
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 (ignore the periods, they're there to make the HTML code viewable):


--------------------------------------------------------------------------------

<.HTML>
  <.HEAD>
  <.TITLE>A Simple Program<./TITLE>
  <./HEAD>
  <.BODY>

Here is the output of my program:

<.APPLET CODE="HelloWorld.class" WIDTH=150 HEIGHT=25>
  <./APPLET>
  <./BODY>
  <./HTML>

By OTA:  Yupei Xiong, PhD

OTA Rating:  4.8/5

Your Price:  $2.19  (original value ~$35.91)

What's included:

  • Plain text response
  • Attachment(s):
    • RESolutions.java
    • RESolutions2.java
    • Test.html
$2.19 Download Add to Cart

Add to Shopping Cart
$2.19 Instant Download
Java Help 3 - A local middle school hired you to write a quiz program that answers questions about Math, Science and the Arts. The program user should be able to select from these topics by entering an option when the program starts. For example, you may use M for Math, S for Science, A for the Arts, and X to exit the program. After the student selects the topic, the program presents a series of q...
Java Help - The Lottery Problem: A lottery requires that you select six different numbers from the integers 1 to 49. Write a Java program that will do this for you and generate five sets of six numbers as a result. For generating random numbers you can use the random() static method of class Math. It returns a double so you will need to cast it as an integer. If you set the range to 49, you ca...
Java Help 4 - Java programmers can use class hierarchies for the purposes of inheritance. For example, given a Tree class, we could define Conifer and Deciduous sub classes that inherit from the parent Tree class as you can see here: See attached file for full problem description.
Java Help - Describe some of the methods for allocating memory for an array and describe methods for initializing an array. Please include example code that does this.
SQL 2005 - Use SQL Management Studio to create a database called ITD640_P1.MDF. Add the tables and data shown below to the database. Use the appropriate field types and lengths for the tables. See attached file for full problem description.

Page generated in 0.0506 seconds

About Us ·  Contact Us ·  Samples ·  Solutions ·  Legal Terms and Conditions ·  Privacy Policy

©2008 SolutionLibrary.com

Search for Solutions About Us Samples