Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSE 112 Lab #12 Modified Mortgage Payment Program Input Validation, Strings, Chars, and Output Formatting Ref: Chapter 13 Mortgage program (page 813 - #15) Modify

CSE 112 Lab #12 Modified Mortgage Payment Program Input Validation, Strings, Chars, and Output Formatting

Ref: Chapter 13 Mortgage program (page 813 - #15)

Modify the program from Lab #7 by adding an input function and output formatting function in accordance with the requirements below. The functions do not have to be part of the class.

1. Limit the maximum Loan Amount to $100,000.00

2. Accept the interest rate (4.5% as 4.5), and limit the interest rate to 22% maximum

3. Limit the Loan Duration to 6 years (using whole years)

4. Validate all input values for any error (non-digit, zero or negative values, etc.)

5. Echo the inputs with titles and the formatting specified in 6 and 7

6. Add commas to the output values for thousands, and millions.

7. Add a percent sign for the interest rate

8. Left align the titles, and right align the values

9. Space everything for alignment as shown

image text in transcribed

References: char[], string, sprint, cin.fail), cin.clear(), system("CLS") "EABCCTSpring 20181CSE 111 New Book\Labs and Solutions CSE 111 NEA.L Enter the amount of the loan: 12345.67 Enter the annual interest rate (example 3 3%): 2.5 Enter the Duration of the Loan in years: 6 Loan amount: Interest Rate Duration (years): Monthly Payment: Total Payback Amount: Total Interest Paid-in $12,345.67 2.50% 6 $184.83 $13,307.57 $961.90 Enter ""to compute another loan

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions