Question

In: Computer Science

Acquire the first name of the applicant. Use the applicant’sname in the required prompts to...

  • Acquire the first name of the applicant. Use the applicant’s name in the required prompts to show that you are a friendly bank.

  • Prompt the customer to enter the percentage of his/her down payment which is a double value. Note if the percentage is 23.4%, the customer will enter “23.4” without the percentage sign.

  • If the customer can NOT put at least 15% down, reject the application.

  • If the customer can put 15% or more as the down payment, prompt the customer to enter his/her credit score which is supposed to be an integer.

  • If the customer’s credit score is less than 500, reject the application.

  • If the customer’s credit score is greater than or equal to 500, approve the application.

  • At the very beginning of the file, write the following lines as comments.

    // By Joe Smith (replace it by your name)

    // Homework 2, xx/xx/xxxx (replace it by the submission date)

    // Home Loan Approval Engine

  • If the customer’s credit score is less than 500, reject the application.

  • If the customer’s credit score is greater than or equal to 500, approve the application.

At the very beginning of the file, write the following lines as comments.

// By Joe Smith (replace it by your name)

// Homework 2, xx/xx/xxxx (replace it by the submission date)

// Home Loan Approval Engine

Name your file HomeLoanApproval.java

Solutions

Expert Solution

// By Joe Smith (replace it by your name)

// Homework 2, xx/xx/xxxx (replace it by the submission date)

// Home Loan Approval Engine

import java.util.Scanner;

class HomeApproval
{
   public static void main (String[] args)
   {
       Scanner input = new Scanner(System.in);
      
       System.out.println("Enter the first name of the applicant : ");
       String firstName = input.nextLine();
      
       System.out.println(firstName+" enter the percentage of your down payment : ");
       double downPaymentPercentage = input.nextDouble();
      
       if(downPaymentPercentage < 15.0)
       System.out.println("Sorry "+firstName+" your application is rejected");
       else
       {
           System.out.println(firstName+" , enter your credit score : ");
           int creditScore = input.nextInt();
           if(creditScore < 500)
           System.out.println("Sorry "+firstName+" your application is rejected");
           else
           System.out.println("Congratulations!! "+firstName+" your application has been approved");
       }
   }
}

Output:

Enter the first name of the applicant : Adams
Adams enter the percentage of  your down payment : 15.1
Adams , enter your credit score : 520
Congratulations!! Adams your application has been approved

Related Solutions

Write the pseudocode that prompts the user for their first and last name. Display the first...
Write the pseudocode that prompts the user for their first and last name. Display the first initial of their first name and their last name to the user. Ask the user to input a phone number. The program checks which part of Colorado a phone number is from using the values below. If the second digit of the phone number is one of the below digits, print the phone number and which part of Colorado it is from. If none...
Write a program that prompts the user to input their first name from the keyboard and...
Write a program that prompts the user to input their first name from the keyboard and stores them in the variable "firstName". It does the same for last name and stores it in the variable "lastName". It then uses strcat to merge the two names, separates them by a space and stores the full name into a string variable called "fullName". In the end, the program must print out the string stored within fullName. ANSWER IN C LANGUAGE ! You...
Write a JAVA program that prompts the user to enter a single name. Use a for...
Write a JAVA program that prompts the user to enter a single name. Use a for loop to determine if the name entered by the user contains at least 1 uppercase and 3 lowercase letters. If the name meets this policy, output that the name has been accepted. Otherwise, output that the name is invalid.
jgrasp environment, java write a complete program that prompts the user to enter their first name,...
jgrasp environment, java write a complete program that prompts the user to enter their first name, middle name, and last name (separately). print out thier name and initials, exactly as shown: your name is: John Paul Chavez your initials are: J. P. C. use string method chartAt() to extract the first (zero-th) character from a name(the name is a string type): username.charAt(0). thank you.
Write a program that prompts the user for their first and lastname. Display the first...
Write a program that prompts the user for their first and last name. Display the first initial of their first name and their last name to the user.Ask the user to input a phone number.The program checks which part of Colorado a phone number is from using the values below.If the second digit of the phone number is one of the below digits, print the phone number and which part of Colorado it is from. If none of the digits...
Create a class that holds data about a job applicant. Include a name, a phone number,...
Create a class that holds data about a job applicant. Include a name, a phone number, and four Boolean fields that represent whether the applicant is skilled in each of the following areas: word processing, spreadsheets, databases, and graphics: Include a constructor that accepts values for each of the fields. Also include a get method for each field. Create an application that instantiates several job applicant objects and pass each in turn to a Boolean method that determines whether each...
Part A In PyCharm, write a program that prompts the user for their name and age....
Part A In PyCharm, write a program that prompts the user for their name and age. Your program should then tell the user the year they were born. Here is a sample execution of the program with the user input in bold: What is your name? Amanda How old are you? 15 Hello Amanda! You were born in 2005. Write the program. Format your code using best practices. Refer to the zyBooks style guide, if needed, to use proper naming...
C++ Write a program that prompts for a file name and then reads the file to...
C++ Write a program that prompts for a file name and then reads the file to check for balanced curly braces, {; parentheses, (); and square brackets, []. Use a stack to store the most recent unmatched left symbol. The program should ignore any character that is not a parenthesis, curly brace, or square bracket. Note that proper nesting is required. For instance, [a(b]c) is invalid. Display the line number the error occurred on. These are a few of the...
1. Write the SQL code required to list the employee number, first and last name, middle...
1. Write the SQL code required to list the employee number, first and last name, middle initial, and the hire date. Sort your selection by the hire date, to display the newly hired employees first. 2. Modify the previous query and list the employee first, last name and middle initial as one column with the title EMP_NAME. Make sure the names are listed in the following format: First name, space, initial, space, last name (e.g. John T Doe). Hint: use...
Name your file “DMx1_Your last name_Your first name.” You can use MS Word to complete the...
Name your file “DMx1_Your last name_Your first name.” You can use MS Word to complete the matrices (go to Insert, Table, Insert table, fill the table). Save the file as a PDF file. If you draw the matrices on paper, take pictures. Make sure the pictures are clear and readable. Insert the pictures in MS Word document and save it as a PDF file. 1. Align using dot matrix: horizontal sequence – AGGCTCCC, vertical sequence – GCGCTCCG. Trace and explain...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT