Write a Java Class/Program named MortgageValidation to determine if a candidate qualifies for a FHA Mortgage.
The qualifications given are:
- Residence: The home must be your primary residence for at least the first year.
- Down payment: They must have a credit score of at least 580.
The Java Program needs to do the following. This can all be done in the main() method.
- Create a boolean variable to store the Residence requirement.
- Prompt the user to “Enter 1 if the Home will be the primary residence, or 0 if not the primary residence”.
- Store the result of step 2 into a byte variable.
- Set the boolean variable from step 1 to true or false depending on value in step 3.
- Create an int variable to store the credit score.
- Prompt for the credit score and store it in the variable created in step 5.
- If the residency and credit score qualify, then display “Qualifies for the loan”. Otherwise display “Does not qualify for the loan”.
This can all be done inside the main() method.
Enter 1 if the Home will be the primary residence, or 0 if not the primary residence: 1
Enter the Credit Score: 500
Does not qualify for the loan.


0 comments