Reference no: EM13941703
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>
Identify two domestic and military achievemen of napoleon
: Identify two domestic and two diplomatic/military achievements of Napoleon. What was his greatest success? What was his worst blunder?
|
Factors that influence the behaviour of consumers
: There are many individual factors that can influence the behaviour of consumers (needs, motivations, personality, consumer perception, learning, and involvement and consumer attitudes).
|
What is the effective annual yield on the bill
: The Economist quotes 6.00% for the Treasury bill with a par value of $100,000 due two months from now. What is the effective annual yield on the bill?
|
Determine your net return on cumberland software
: You purchased 1000 shares of stock in Cumberland Software for $3 per share on January 1, 2006. Over the next four years you received 7 cents per share annually in dividends. On December 31, 2009 you sell all your shares of Cumberland Software for $16..
|
The calculations were provided to you by a real estate agent
: Your applet needs to extend the Applet (or JApplet) class. Of course, you need to import the appropriate applet package(s).
|
Primary and secondary research-event volunteering
: Topic is Event Volunteering. You will need to conduct both primary and secondary research to address a problem or issue of investigation. You need to demonstrate reserach skill and formulate a well written, academically rigorous report.
|
Preferred stock is valued using capital asset pricing model
: Which one of the following statements is correct? An increase in the market value of preferred stock will increase a firm's weighted average cost of capital. The cost of preferred stock is unaffected by the issuer's tax rate. Preferred stock is gener..
|
Prepare a balance sheet for alaskan orange corporation
: Prepare a balance sheet for Alaskan Orange Corp. as of December 31, 2010, based on the following information:
|
Development of a national advertising campaign
: How could a marketing manager for the following use the material in this chapter to guide the development of a national advertising campaign (choose one)? To assist local retailers or organizations in developing their promotional activities? Would..
|