Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions 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

image text in transcribed

Instructions 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 askoan Retum type: bool Parameters: None askincome Retum type: double (income) Parameters): None as Amount Retum type: double (loan) Parameters): None decide Loan Retum type: bool Parameters): double (income), double (loan) Validate all user input using loops: When validating the user input for askoan (). accept the following user input for each choice: "Yes", "Y" "yes", and "y" returns true "NO" "N","no"and returns false When validating the user input for askIncome () and askAmount(), make sure the input is greater than or equal to 0. Some notes: In order to cam full credit, you MUST properly define and call the four functions. Just because the program works, does not mean it is properly written You may NOT use any global variables in your program. Properly send arguments to functions and use their return values Optional Bonus (+2 points) Write a program named loanloop.cpp that extends the functionality of loan.cpp by . Giving the user a chance to start over if the loan is rejected Displaying commas in the dollar amount representation in the loan acceptance rejection message Sample Output Would you like to take out a loan? Invalid choice please enter yes or no. Would you like to take out a loan? How much would you like to borrow 45000 What is your yearly income? 15000 Congratulations! Your loan request for $45000 has been accepted

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To Database 2

Authors: Bruce L. Larson

1st Edition

0070232679, 978-0070232679

More Books

Students also viewed these Databases questions