In: Computer Science
Write a Java Program to determine if a candidate qualifies for a FHA Mortgage. (using eclipse IDE)
The qualifications given are:
The Java Program needs to do the following. This can all be done in the main() method.
This can all be done inside the main() method.
Example Input/Output:
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.
hey there ! i am done with the code ,,, Please give me a like to appciate my work and efforts....
here is the code -
package FHA;
import java.util.Scanner;
/**
*
* @author Aditya kumar
*/
public class FHAClass {
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
//step 1 : declaring boolean variable
boolean primaryresidence=false;
int creditscore=0;
System.out.println("Enter 1 if the Home will be the primary
residence, or 0 if not the primary : ");
int check=sc.nextInt();
//step 2 for the credit score
System.out.println("Enter the Credit Score : ");
creditscore=sc.nextInt();
if(creditscore>=563 && check==1)
{
System.out.println("Qualifies for the Loan .");
primaryresidence=true;
}
else if(creditscore<563 && check==0)
{
System.out.println("Does not Qualify for the Loan .");
primaryresidence=false;
}
else
{
System.out.println("Please Enter appropiate option ");
}
}
}
and the snapshot of the output is -
Thank You ! Dont forget to like !