Mortgages_Cal

We have many free term papers and essays on Mortgages_Cal. We also have a wide variety of research papers and book reports available to you for free. You can browse our collection of term papers or use our search engine.

Mortgages_Cal

Week 4 Assignment
David Moak
University of Phoenix
Computer Programming I
POS/406
Instructor: Mr. Jim Leadbeter
June 7, 2007

Week 4 Assignment

/* ----------------------------------------------
* Mortgage Program
* Student: David Moak
* Class Date: June 7, 2007
* Course Title: University of Phoenix POS 406
* Instructor: Mr. Jim Leadbeter
* ----------------------------------------------
*/

import java.awt.*; // User interface classes
import java.io.*;
import java.awt.event.*; // Event handling
import java.text.*; // Text formatting
import java.math.*; // Math

public class Mortgage_Calc_W4

{

// Define a button listener
private static class ButtonHandler implements ActionListener
{

public void actionPerformed(ActionEvent event)// Event handler method
{
outputLabel.setText ("See Output Window");

DecimalFormat currency_format = new DecimalFormat("0.00");

Loan_Amount = Double.parseDouble(inputMort.getText()); // Principal - amount of full loan
double Interest = Double.parseDouble(inputIntRate.getText());
double Length_of_Loan = Double.parseDouble(inputYears.getText());
double Monthly_Interest = Interest / (12 * 100); // Monthly interest
int Number_of_Months = (int) Length_of_Loan * 12; // Total # of months
double Monthly_Payment = (double) (Loan_Amount * (Monthly_Interest / (1 - (Math.pow((1 + Monthly_Interest), -Number_of_Months)))));
double MortAMT = Double.parseDouble(inputMort.getText());

String Monthly_Payment_String = NumberFormat.getCurrencyInstance().format(Monthly_Payment);
String Monthly_Interest_String = String.valueOf(Monthly_Interest);

// Strings for output
String lineOne; // Strings to hold...
  • Submitted by: e31tobase
  • Date Submitted: 07/04/2007 09:29 AM
  • Category: Technology
  • Words: 479
  • Pages: 2
  • Views: 154
  • Rank: 93747

Related Essays

  • Mortgages_Cal Mortgages_cal. Week 4 Assignment David Moak University of Phoenix Computer Programming I POS/406 Instructor: Mr. Jim Leadbeter June ...

Saved Papers

Save papers so you can find them more easily!

Join Now

Get instant access to over 170,000 papers.

Join Now