ReviewEssays.com - Term Papers, Book Reports, Research Papers and College Essays
Search

Pos 406 Week 2

Essay by   •  February 14, 2011  •  Essay  •  283 Words (2 Pages)  •  840 Views

Essay Preview: Pos 406 Week 2

Report this essay
Page 1 of 2

/*

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

...

...

Download as:   txt (1.9 Kb)   pdf (56.3 Kb)   docx (9.6 Kb)  
Continue for 1 more page »
Only available on ReviewEssays.com