Week 2 Java Mortgage Program
Below is one of our free research papers on Week 2 Java Mortgage Program. If the term paper below is not exactly what you're looking for, you can search our essay database for other topics or order a custom essay.
Week 2 Java Mortgage Program
/*
Java program to create a gui that will calculate an amortarized mortgage based
on user input values.
Class: PRG421
Assignment: Week 2 Individual Assignment
Date: 14 September 2008
Program Specifications:
Week 2 Individual Assignment:
The following assignments are based upon Service Request SR-mf-003, Mortgage Payment Calculator,
in the Virtual Organizations. Complete Change Request #4 in Service Request SR-mf-003.
Change Request #4
Requestor: Ninfa Pendleton - Rapid City, SD
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, the term of the mortgage,
and the interest rate of the mortgage. Allow the user to loop back and enter new data or quit.
Please insert comments in the program to document the program.
*/
// inport required classes for the program to use
import java.io.*;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import java.text.*;
import java.util.*;
// class declartion and opening
public class Mortgage extends JApplet
{
// open main, set values for the program, set parameters for the gui, allow resize of the gui
public static void main(String[] args)
{
// new Mortgage
JApplet applet = new Mortgage();
// Set the Frame title in the head frame of the GUI
JFrame frame = new JFrame("PRG421 Mortgage Calculator ");
// close the application when the gui closes
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// allow user to resize the gui window are they want to
frame.setResizable(true);
// set parameters for the gui screen and allow it to be seen
frame.getContentPane().add(applet);
frame.setSize(380,400);
applet.init();
applet.start();
frame.setVisible(true);
// close main
}
// set various method parameters, interest rates, term durations and labels for fields in gui...
- Submitted by: crookri
- Date Submitted: 10/05/2008 08:47 AM
- Category: Technology
- Words: 779
- Pages: 4
- Views: 2382
- Rank: 1645