lab3 - 5.125% 189.28 11357.13 5.25% 189.85 11391.59 ......

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS101   Lab3 Objectives Loop control and selection control statements Java Input and output Numerical computation Documentation and formating Lab description In this lab, you are going to develop a program that can compares loans with various interest rates. The  program will let use enter the loan amount and loan period in the number of years and displays the  monthly and total payments for each interest rate stating from 5% to 8%, with an increment of 1/8.  Suppose you enter the loan amount 10,000 for five years, display a table as follows.  Loan Amount: 10000 Number of Years: 5 Interest Rate Monthly Payment Total Payment 5% 188.71 11322.74
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 5.125% 189.28 11357.13 5.25% 189.85 11391.59 ... 7.85% 202.16 12129.97 8.0% 202.76 12165.83 The formula to compute the monthly payment is as follows. You can also find the formula on page 46 of the textbook. (loanAmount*monthlyInterestRate)/( 1- 1/(1+monthlyInterestRate)^(numberOfYears*12) ) Your program should also check the inputs of the user so that only positive integer number shall be accepted. If the user enters a negative or non-integer loan amount, or loan period, you should remind the user and ask him/her to enter again. Submission your source code your report following instruction in the syllabus...
View Full Document

This note was uploaded on 04/29/2008 for the course CS 101L taught by Professor Vineyard during the Fall '07 term at Kettering.

Ask a homework question - tutors are online