Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started