Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are working as a computer programmer for a mortgage company that provides loans to consumers for residential housing. Your task is to create an
You are working as a computer programmer for a mortgage company that provides loans to
consumers for residential housing. Your task is to create an application to be used by the
company's loan officers when presenting loan options to its customers. The application will be a
mortgage calculator that determines a monthly payment for loans and produces an amortization
schedule for the life of the loan.
The company offers and year fixed loans.
Loan amounts are between and
Annual Interest rate must be and
Amortize Schedule Creation:
The amortized schedule for the loan must be created using a recursive function.
Payment Calculator
The formula to calculate the monthly payment for a fixedinterest rate loan is as follows:
Requirments:
Global Values: Avoid using global variables, except for constants.
Display Information: Show your name, lab number, and lab name on the screen.
Loan Principle: Prompt and accept a valid loan principle amount double between and inclusive, rejecting invalid inputs.
Annual Interest Rate: Prompt and accept a valid annual interest rate double between and rejecting nonnumeric and nonpositive entries.
Loan Term: Prompt and accept the term of the loan in years int as or rejecting other entries.
Calculate Monthly Payments: Calculate the number of monthly payments for the loan.
Monthly Payment Function: Create a function calcMonthlyPayment that calculates the monthly payment using principal, monthly interest rate, and number of payments as parameters.
Amortization Schedule Function: Create a recursive function calcAmortizeSchedule to produce and display an amortization schedule with proper formatting, including column headings. Use setw function for formatting.
Data Validation: Check for invalid data, including nonnumeric and nonpositive entries. Ensure values are within specified ranges for principal, interest rate, and term.
Code Style: Use proper indentation, meaningful identifiers, and appropriate comments in your code.
Note: please add the code that does validation checks with the source cited
Please follow the instructions and thank you so much
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