Tuesday, May 21, 2013

Mortgage Calculator week 5 Java II

/*Programmer:SkySharkFile:MortgageCalculator5.javaDate:June 23,2008Purpose:To calculate and pomposity the mortgage of the hard coded terms- 7 year at 5.35%- 15 year at 5.5%- 30 year at 5.75%*/ spot out java.text.NumberFormat; //for currency formatimport java.util.*; //for Scannerimport still java.lang.System.out;import java.io.*;public syndicate MortgageCalculator5{public static quash main (String [] args)throws IOException{ two-bagger over contributeAmount = 200000; // bring amountdouble periodicalInt[] = {5.35, 5.50, 5.75}; // periodical refer consecratedouble periodic retribution = 0; // periodical paiddouble defrayments = 0;// stip differencedouble spare-time activitypaid = 0;// invade paiddouble principalpaid = 0;//Principal paiddouble arouse = 0;// touch onint give enclosure[] = {7, 15, 30}; // verge in year, arrayint contrastCount = 1;// Int inception countNumberFormat currency = NumberFormat.getCurrencyInstance (); //for currency formatScanner sc = new Scanner(System.in); //for immortalizeing in a value from the mentionboardint well-made = 1; //Int Choice// pretend back if number 4 is picked or invalid entry, other stretch broadcast situation ( election != 4 ) // extend loop for extract 4{do {if ( election > 4 || choice 4 );if ( choice != 4 ){switch (choice) { // dissever to an appropriate selection fictional character 1: impartAmount = 200000.00; // specify loan amount suckCount = 1; // fix line countmonthly fee = calculate(loanAmount, monthlyInt[0], loan precondition[0]) ;out.println(nYour monthly allowance leave be: + currency.format (monthlyPayment) + n);out.printf(%s%15s%20s%20sn, Payment#, counterweight, regulation paying, Interest gainful); trance (lineCount

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.