You will use the flowchart to design and write a program that uses a function for each step. Write a program named loan.cpp that defines and calls the following functions, EXACTLY as specified below:...


Do not use any global variable. Properly send arguments to functions and use their return values


You will use the flowchart to design and write a program that uses a function for each step. Write<br>a program named loan.cpp that defines and calls the following functions, EXACTLY as<br>specified below:<br>askLoan ()<br>o Return type: bool<br>o Parameter(s): None<br>askIncome ()<br>o Return type: double (income)<br>o Parameter(s): None<br>askAmount ()<br>o Return type: double (loan)<br>o Parameter(s): None<br>decideLoan ()<br>o Return type: bool<br>Parameter(s): double (income), double (loan)<br>Validate all user input using loops:<br>When validating the user input for askLoan (), accept the following user input for each<br>choice:<br>

Extracted text: You will use the flowchart to design and write a program that uses a function for each step. Write a program named loan.cpp that defines and calls the following functions, EXACTLY as specified below: askLoan () o Return type: bool o Parameter(s): None askIncome () o Return type: double (income) o Parameter(s): None askAmount () o Return type: double (loan) o Parameter(s): None decideLoan () o Return type: bool Parameter(s): double (income), double (loan) Validate all user input using loops: When validating the user input for askLoan (), accept the following user input for each choice: "Yes", "Y", "yes", and "y" returns true "No", "N", "no", and "n" returns false When validating the user input for askIncome () and askAmount (), make sure the input is greater than or equal to 0. Sample Output 1 Would you like to take out a loan? maybe Invalid choice; please enter yes or no. Would you like to take out a loan? Yes How much would you like to borrow? 45000 What is your yearly income? 15000 Congratulations! Your loan request for $45000 has been accepted!
A bank uses the following flowchart to determine whether a customer is eligible for a loan. It<br>contains four steps, separated by color.<br>START HERE<br>bool askLoan()<br>How much would you<br>like to borrow?<br>Would you like to take<br>Invalid choice<br>out a loan?<br>double<br>cin >> loan<br>Yes<br>askAmount()<br>Yes/Y/yes/y<br>Please enter yes or no<br>or<br>No/N/no/n<br>if loan < 0<br>Please enter positive #<br>No<br>Thanks for visiting the bank!<br>bool decideload(double income, double loan)<br>if income <= 10,000<br>What is your yearly<br>Income?<br>if income * 5 >= loan<br>ACCEPT<br>REJECT<br>double<br>askincome()<br>if income > 10,000<br>and income < 100,000<br>cin >> income<br>if income 5 < loan<br>REJECT<br>if income <0<br>Please enter positive #<br>if income >= 100,000<br>ACCEPT<br>

Extracted text: A bank uses the following flowchart to determine whether a customer is eligible for a loan. It contains four steps, separated by color. START HERE bool askLoan() How much would you like to borrow? Would you like to take Invalid choice out a loan? double cin >> loan Yes askAmount() Yes/Y/yes/y Please enter yes or no or No/N/no/n if loan < 0="" please="" enter="" positive="" #="" no="" thanks="" for="" visiting="" the="" bank!="" bool="" decideload(double="" income,="" double="" loan)="" if="" income=""><= 10,000="" what="" is="" your="" yearly="" income?="" if="" income="" *="" 5="">= loan ACCEPT REJECT double askincome() if income > 10,000 and income < 100,000="" cin="">> income if income 5 < loan="" reject="" if="" income=""><0 please="" enter="" positive="" #="" if="" income="">= 100,000 ACCEPT
Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here