Prg 420 Week2
By: Jon • Study Guide • 442 Words • March 6, 2010 • 1,225 Views
Join now to read essay Prg 420 Week2
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 /