## Math & Scanner Lab Worksheet

posted by: Mr. Bergquist 25 October 2011 No Comment

First, in Practice It! do these three Exercises:
(0: Optional Warm Up on Math Methods: Self-Check 3.10: mathExpressions )

Then do at least one of these three and have it manually checked off (highly recommend doing at least the first one!).  If you have more time, do all of them…

1. Write a method placeCircles that has Scanner and Graphics parameters. Your method should prompt the user for a number of circles to draw then ask for information about each circle:
2. If you ever find yourself buying a house, you’ll want to know what your monthly payment for the loan is going to be. Write a method that asks the user for information about a loan and prints the monthly payment.The formula for computing monthly mortgage payments involves the loan amount, the total number of months involved (a value we call n) and the monthly interest rate (a value we call c). The payment formula is given by the following equation:An example run of your program might produce the following output (user input is underlined):
```This program computes monthly loan payments.
Loan amount? 275000
Number of years? 30
Interest rate? 6.75