Question: Java code file inserted below. To complete this program you will need to add the if statement and output statement. Once you add the code,

Java code file inserted below. To complete this program you will need to add the if statement and output statement. Once you add the code, run the program to assure it runs appropriately and upload your java file here for grading. The program determines a person's eligibility for a car loan. You will need to output the following if they do qualify "You are qualified for automotive financing" If they do not qualify you need to output "Sorry, you do not qualify for financing" You will most likely need to create a nested if statement to determine qualifications.

import java.util.Scanner;

/*

This program demonstrates a nested if statement.

*/

public class CarLoanQualifier

{

public static void main(String[] args)

{

double salary; // Annual salary

double yearsOnJob; // Years at current job

// Create a Scanner object for keyboard input.

Scanner keyboard = new Scanner(System.in);

// Get the user's annual salary.

System.out.print("Enter your annual salary: ");

salary = keyboard.nextDouble();

// Get the number of years at the current job.

System.out.print("Enter the number of years " +

"at your current job: ");

yearsOnJob = keyboard.nextDouble();

// Determine whether the user qualifies for the loan.

//Enter your if statement and output statment(s) below

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!