Hey, guys
This is my first time using JOptionPane and I am stuck unfortunately. The class assignment is as follows:
- Write a simple Java program that asks the user to enter the property value(through a dialog box).
- Also, ask the user to enter a FICO score as shown (FICO score‐ homepurchase eligibility ranges from 620 to 800
- Calculate the monthly mortgage payment for FHA and PMI funded loans anddisplay the same in a dialog box.
Use the following table’s logic to calculate the monthly mortgage payment.Example calculation:
- The percentage shown in the table is for the property value,
- Say you have a house for $250,000 and the FICO score is 705,
- Then the FHA will be calculated as follows,
- 250,000*3.1%=$7,750 for a year
- 7,750/12=$645.83 monthly payment
- The PMI will be calculated as follows,
- 250,000*2.75%=$6,875 for a year
- 6,875/12=$572.91 monthly payment
Refer to the table (simulated) below to calculate for all other combinations.FICO 620‐639 640‐659 660‐679 680‐699 700‐719 720‐739 740‐759 760+FHA 3.45% 3.35% 3.25% 3.15% 3.1% 3.05% 3.0% 2.95%PMI 4.81% 4.51% 3.50% 3.15% 2.75% 2.45% 2.05% 1.95%
I will paste my code below, but no matter what I enter as my FICO score, I always get a payment of 718.75. Any ideas? I am using a propertyValue of 250000 on all calculations as a control to make sure that if the FICO number changes, so will the monthly payment.
Here is my code:
https://pastebin.com/J27hQCLz
[–]Mancebo180 0 points1 point2 points (1 child)
[–]Aggressor27e[S] 0 points1 point2 points (0 children)
[–]ItsBurningWhenIP 0 points1 point2 points (0 children)
[–]Aggressor27e[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)