Programming Assignment #3
- This assignment is comprised of modifying your program which will calculate a monthly
amoritzed amount (e.g. a house mortgage). For this program, you are to build a GUI for
the mortgage calculator. The behavior and layout of this program should be as in the example below.
Total points for this assignment will be 50 points. This assignment is due on or before
Tue Nov 5.
All objects and techniques necessary for this assignment have been (or will be) covered
in class. The program should look and function as follows:
- The formula to use for this assignment should be as follows:
- You must set the names of all objects/variables included in your
program to have meaningful names with correct naming conventions.
- You should refer to the programming guidelines and
follow all guidelines presented there. Failure to adhere to any of the assignment
specifications/programming guidelines will result in loss of points.
- Make sure to keep a copy of the source code that you turn in.
- Please feel free to ask questions/send e-mail if any items require clarification.
Hints & Updates
: (updated Oct 27th)
- You should remove all usage of the scanner method, since input will come from textboxes in this program.
You will still need the Double.parseDouble() method to parse the strings from the textboxes to double types (see notes).
- You should remove the loop, and the run again query from your previous programs as it is not required with
a form based program.
- The try-catch block and the test for negative numbers remain as is.
- Be sure to adhere to the formula listed above. Deviating from this will most likely result in erroreous
results.
- You may need to reset your input values to zero, in the case of valid data the first run and an
exception the next. Pay attention to the examples above.
- As before, I suggest using data type of double for this assignment.
- You must catch any invalid data as before, and inform the user using a JOptionPane dialog box, as discussed
in class. See example above. Refer to notes and see zyBook example 15.5.1 (the else).
- If bad data is entered, clear all of it following the message box popup.
- Make sure you modify the input values for Rate and Years as specified in class.
- You must use the NumberFormat.getCurrencyInstance() method presented in class to format your output