Essays24.com - Term Papers and Free Essays
Search

Prg420 Week2

Essay by   •  May 24, 2011  •  442 Words (2 Pages)  •  1,027 Views

Essay Preview: Prg420 Week2

Report this essay
Page 1 of 2

import java.io.*;

import java.util.*;

import java.text.*;

public class Calculator //begins Calculator class

{

public static void main(String[] args) throws IOException

{

//declares variables and defines hard coded values

double principal = 200000;

double interest = 0.0575;

int term = 30;

//prints an explanation of the calculations to be performed

//and the data that will be displayed by he program

System.out.println("nThis program will calculate and display the monthly " +

"nmortgage payment needed to fully amortize a $200,000.00 loan " +

"nover a term of 30 years at a 5.75% interest rate.");

System.out.println();

System.out.println();

//calculations to find monthly interest rate and payment amount

double monthlyInterest = interest / 12;

double payment = (principal * monthlyInterest)

/ (1 - Math.pow(1/ (1 + monthlyInterest), term * 12));

...

...

Download as:   txt (1.6 Kb)   pdf (44.7 Kb)   docx (8.8 Kb)  
Continue for 1 more page »
Only available on Essays24.com