Site hosted by Angelfire.com: Build your free website today!

CIS73555.doc Lab Assignment 5 Due 10-19-09

Object Oriented Java Programming

 

This week we are going to write an application program file that we will use to research how to use the new syntax that we have discussing in chapter 3 including the while loop, working with different data types and using Java classes for working with data types. We will be taking all of the data from the keyboard.

 

 

Write one executable Java application file that will:

 

1. Prompt the user to enter a reverse mortgage amount, an annual simple interest rate, a number of years, an application/closing fee, and an annual loan service fee.

2. Assume that the user will enter valid values for all input data.

 

3. Display all inputs.

 

4. Add the application/closing fee to the reverse mortgage balance.

 

 

5. For each year add the annual loan service fee to the mortgage balance, calculate the simple interest amount based on the mortgage balance, and add the interest to the new mortgage balance. Use an increment or decrement operator and shortcut assignment operators.

 

4. For each year display a line with the following data from left to right:

 

a. the year number

b. previous year end mortgage balance

c. annual loan service fee

d. annual interest amount

e. the new mortgage balance for that year

.

 

5. After the calculated data for all of the years has been displayed, display the final cost of the reverse mortgage.

 

6.Specifications for displayed output:

 

a. Round the calculated dollar amounts to two decimal places, with a $ sign and appropriate commas using an object of the NumberFormat class.

 

b. The interest rate should display as a percent with a % sign and two significant places using an object of the NumberFormat class.

 

7. Test with at least 5 years.

 

Notes:

 

1. Label the end of all classes, methods, and blocks with a comment.

 

2. Line up the beginning brace { and ending brace } vertically for each block. (i.e. for each class, method, and block)

 

3. Indent all code between the beginning and ending braces so that the lineup of braces can be easily observed.

 

4. Include comments at the beginning of every .java source file with the assignment number, author, date due, and an essay (with paragraphs) at the start of the file describing the functionality of each class as well as how each class “works”. User instructions should also be provided. Are there comments reference important or complex syntax?

 

5. Insert dividers/separators (i.e. a line of dashes or a line of asterisks) between each method and class.

 

6. Capture your test results and paste them into the end of your .java source class file as comments.

 

7. Submit an electronic copy of your .java source class files for credit. Note that all submissions should be made as attachments to an email, and sent to the instructor with the following subject line:

 

CIS73 Lab x

 

where x = the lab assignment number. Note that the subject line is case sensitive. All assignments should be submitted on or before the due date for full credit per the course policies.

 

8. All data output should have data titles.

 

9. All primitive data should be formatted on output.

 

10. Prompts should be used for all data input from the keyboard.

 

11. Note once again that all duplicate .java files that are submitted for a grade will NOT be graded.

 

12. If you are having problems that you and your classmates cannot resolve, you should review the “Suggestions for Success” on my home page and attempt to resolve them in our 2 hours of lab sessions each week. Note that there are 3 class tutors that are available in the lab for a total of 7 hours each week plus they are available by appointment. If all else fails then get back to me via email or make an appointment with me.....We care about the students that care!

 

 

“There is no substitution for adequate preparation.”

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Source: Mr. Sanford