Pos 406 Week 2
Essay by review • February 14, 2011 • Essay • 283 Words (2 Pages) • 906 Views
/*
Course Name Title: POS/406
Assignment: Week 2 Individual Assignment
School:
Program Objective: Write the program in Java (without a graphical user interface)
using a loan amount of $200,000 with an interest rate of 5.75% and a 30 year term.
Display the mortgage payment amount and then list the loan balance and interest paid for
each payment over the term of the loan. If the list would scroll off the screen, use loops
to display a partial list, hesitate, and then display more of the list.
Program Creator:
Date:
Instructor:
*/
import java.io.*; //Standard Input Output for Java
import java.math.*; //For mathe calculations
import java.text.*; //Used for formatting numbers like for decimal places
class MortgageCalc{
public static void main(String[] args) {
//Defining variables
float loanAmount = 200000; //principal
int time = 30; //term
double interest = 0.0575; //interest
double interestRate = (interest/12);
double thismonthInterest;
double thismonthloanAmount;
double thismonthBalance;
//Math Calculations and assigning to the variable Formula
double Formula = ((interestRate) * loanAmount) / (1- (Math.pow (1 + (interestRate), (time * - 12))));
//Assigns the number of decimal places to
...
...