Question: In this lab you will determine whether a customer qualifies for a loan. You will use boolean variables as flags to indicate qualification conditions, and
In this lab you will determine whether a customer qualifies for a loan. You will use boolean variables as flags to indicate qualification conditions, and if the right combination of flags is true, the customer will qualify. Boolean variables can be set the long way or the short way. For example, given boolean variable hasMiddleName, you can set it the long way with something like: if (middleName.length) > 0) hasMiddeName true ; else hasMiddleName = false; The short way uses the same boolean expression as above: hasMiddleName = (middleName. length() > 0); Use the short way throughout the program to set boolean variables. Below are the partial program specifications. You will fill in the rest of the program with knowledge gained from the previous labs. 1. Declare boolean variables hasGoodCredit, hasEnoughIncome, and hasLozDebt. You will declare additional boolean variables to handle some of the conditions described below. 2. On the console, announce the program and what it does. 3. Prompt the user for a customer's name, requested loan amount, credit rating, annual income and the total amount of the customer's current debt. Assume that all four of these quantities are integers
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
