Question: I would like assistance with my coding C++ visual studio. Some terms are not defined properly and i am not sure how to fix it.

I would like assistance with my coding C++ visual studio. Some terms are not defined properly and i am not sure how to fix it.

INSTRUCTIONS::

I would like assistance with my coding C++ visual studio. Some terms

are not defined properly and i am not sure how to fixit. INSTRUCTIONS:: MY PROGRAM::: AutoSave Off C++ Programming Functions and Recursion ProgramAssignment Instructions (2) - Protected ViewSaved to this PC - Search (Alt+Q)

MY PROGRAM:::

Q Brown, Julianna Rachel - BJ File Home Insert Draw Design Layout

References Mailings Review View Help RCM PERRLA Share Comments PROTECTED VIEW Be

carefulfiles from the Internet can contain viruses. Unless you need to edit,

AutoSave Off C++ Programming Functions and Recursion Program Assignment Instructions (2) - Protected ViewSaved to this PC - Search (Alt+Q) Q Brown, Julianna Rachel - BJ File Home Insert Draw Design Layout References Mailings Review View Help RCM PERRLA Share Comments PROTECTED VIEW Be carefulfiles from the Internet can contain viruses. Unless you need to edit, it's safer to stay in Protected View. Enable Editing x CSIS 112 |C++ PROGRAMMING: FUNCTIONS AND RECURSION PROGRAM ASSIGNMENT INSTRUCTIONS OVERVIEW The purpose of this assignment is to get you back into programming and give you some practice with the new concept of recursion. It also utilizes many of the C++ topics that you should be familiar with from your first course in C++. INSTRUCTIONS 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 loan officers of the company 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 10-, 15-, and 30-year fixed loans. Inputs The program should initially prompt the user (the loan officer) for the principal of the loan (i.e. the amount that is being borrowed). It should then ask him or her to enter an annual interest rate for the loan. The final input should be the number of years that the loan will be outstanding. Because the company only offers three different terms (10-, 15-, and 30-year loans), the program should ensure that no other terms are entered. Formulas Payment Calculator [Adapted from Wittwer, J.W., "Amortization Calculation," From Vertex42.com, Nov 11, 2008.] The formula to calculate the monthly payment for a fixed interest rate loan is as follows: Page 1 of 6 0 words per Display Settings D Focus . EA + 100% AutoSave Off C++ Programming Functions and Recursion Program Assignment Instructions (2) - Protected ViewSaved to this PC Search (Alt+Q) Brown, Julianna Rachel BJ - File Home Insert Draw Design Layout References Mailings Review View Help RCM PERRLA Share Comments PROTECTED VIEW Be carefulfiles from the Internet can contain viruses. Unless you need to edit, it's safer to stay in Protected View. Enable Editing v. The formula to calculate the monthly payment for a fixed interest rate loan is as follows: a n r(1+r)" A = P (1+r)" 1 where Page 1 of 6 CSIS 112 = A = payment Amount per period P= initial Principal (loan amount) r= interest rate per period n= total number of payments or periods = Ex mple: What would the monthly payment be on a 15-year, $100,000 loan with a 4.50% annual interest rate? P= $100,000 r= 4.50% per year / 12 months = 0.375% (or 0.00375) per period n = 15 years * 12 months 180 total periods - A = 100,000 * 0.00375 * (1 +.00375)180)/((1+.00375)180 1) Using these numbers in the formula above yields a monthly payment of $764.99. Amortization Schedule An amortization schedule shows the amount of each monthly payment that is being applied to interest and the amount that is being applied to the principal on a loan. The Interest portion of the payment is calculated as the rate (r) times the previous balance and should be rounded to the nearest cent. The Principal portion of the payment is calculated as Page 1 of 6 0 words per Display Settings D Focus . EA + 100% AutoSave Off C++ Programming Functions and Recursion Program Assignment Instructions (2) - Protected ViewSaved to this PC Search (Alt+Q) Brown, Julianna Rachel BJ - File Home Insert Draw Design Layout References Mailings Share Comments Review View Help RCM PERRLA Loan Application - Amortization Schedule Principal: Life of Loan (10, 15 or 30 years): Annual interest rate: Monthly payment: 100000 15 4.5% 764.99 Payment Amount Interest Principal 1 2 3 764.99 764.99 764.99 375.00 373.54 372.07 389.99 391.46 392.92 Balance 100000.00 99610.01 99218.55 98825.63 178 179 180 764.99 764.99 764.99 8.54 5.71 2.86 756.45 759.29 762.14 1521.42 762.14 0.00 Press any key to continue Requirements: To receive credit for this assignment, certain programming features must be implemented in such a way as to demonstrate your knowledge of formulas, functions, input error checking, proper formatting of outputs, and recursion. 1. Start your program by prompting the user to enter a principal amount. The data type of this number should be a double. The amount must be positive and it must also be a numeric value. For example, when prompted to enter a number, if the user enters abc, the program will not be able to process the loan appropriately. Likewise, if the user enters -100000, the program will again produce erroneous results. [See below for code that you can use for error checking.] a 2. Prompt the user to enter an annual interest rate for the loan as a percent. For example, an annual interest rate of 4.5% should be entered as 4.5. Your program will convert it to .045 for calculations. Ifa non numaria ar noontivo intoroot roto in antorad nramnt the user tara antar thornto Page 3 of 6 O words per Display Settings D Focus . EA + 100% AutoSave Off C++ Programming Functions and Recursion Program Assignment Instructions (2) - Protected ViewSaved to this PC Search (Alt+Q) Brown, Julianna Rachel BJ - File Home Insert Draw Design Layout References Mailings Share Comments Review View Help RCM PERRLA the program will not be able to process the loan appropriately. Likewise, II the user enters -100000, the program will again produce erroneous results. [See below for code that you can use for error checking.] 2. Prompt the user to enter an annual interest rate for the loan as a percent. For example, an annual interest rate of 4.5% should be entered as 4.5. Your program will convert it to .045 for calculations. If a non-numeric or negative interest rate is entered, prompt the user to re-enter the rate. Page 3 of 6 CSIS 112 3. Prompt the user to enter the term of the loan. Valid terms are 10, 15, and 30 years. Any other entries should be rejected, and the user should be prompted to re-enter an appropriate value. 4. Once the inputs have been entered and validated, your program must calculate the monthly payment for the loan. To receive credit for the loan calculation, you must create a function called CalcPayment that receives the principal, interest rate, and number of years as parameters. The function should return the monthly payment that is calculated. a a 5. In main(), using the monthly payment that you just calculated, call a function to create an amortization schedule for the loan using these specifications: a. Create a function called Amortize. It should receive as parameters: currentPeriod, totalPeriods, paymentAmount, monthlyInterestRate, currentBalance. b. The function MUST be recursive to receive credit for producing the Amortization Schedule. c. The function should print out the Amortization Schedule to the screen using good formatting (including spelling and grammar where appropriate) Your program should check for invalid data such as non-numeric and non-positive entries for principal, interest rate, and term. Use proper indentation and style, meaningful identifiers, and appropriate comments. Page 3 of 6 O words per Display Settings D Focus . EA + 100% File Edit View Git Project Build Debug Test Analyze Tools Extensions Window Help Search (Ctrl+Q) e Functions and Recursion Program JB - , Debug x64 Local Windows Debugger - D G Do Live Share Solution Explorer 4 X Server Explorer (Global Scope) main() I SOO - 20 Toolbox ConceptOfRecursion.cpp + x ++ Functions and Recursion Program 1 //--Loan Calculations 2 //CSIS 112- 3 4. //include statements 5 #include 6 #include 7 #include 8 using namespace std; 9 Nm N 000 Search Solution Explorer (Ctrl+;) Solution 'Functions and Recursion Program' (1 of 1 project) ++ Functions and Recursion Program 00 References External Dependencies Header Files [ Resource Files 1 Source Files ConceptOfRecursion.cpp A 10 11 12 13 Fint main() { cout > Principal; Solution Explorer Git Changes 26 6 27 Properties - 1 x 28 2 29 A + 30 31 32 while (cin.fail() || num :: max(), ' '); cin >> num; } cout > annualrate; 40 41 42 while (cin.fail() || num Server Explorer Toolbox I ConceptOfRecursion.cpp + x ++ Functions and Recursion Program (Global Scope) 43 cout :: max(), ' '); 47 cin >> num; 48 } 49 cout > Term (10, 15 or 30); 52 53 while (cin.fail() || num :: max(), ' '); 59 cin >> num; 60 Search Solution Explorer (Ctrl+;) Solution 'Functions and Recursion Program' (1 of 1 project) ++ Functions and Recursion Program 00 References External Dependencies Header Files [ Resource Files 1 Source Files ConceptOfRecursion.cpp int num; M (12 * years); monthlyrate = annualrate / 12.0; if (annualrate == 0) Payment Principal / numPayments; else { Term = pow((1 + monthlyrate), numPayments); Payment (Principal * monthlyrate * Term) / (Term - 1.0); 67 - Solution Explorer Git Changes 68 = - 1 x Properties 69 70 A + //Display Monthly Payment cout 00 84 Toolbox Search Solution Explorer (Ctrl+;) Solution 'Functions and Recursion Program' (1 of 1 project) ++ Functions and Recursion Program 00 References External Dependencies Header Files [ Resource Files 1 Source Files ConceptOfRecursion.cpp 90 ConceptOfRecursion.cpp + x ++ Functions and Recursion Program (Global Scope) 82 balance = Principal; //Remaining balance starts out as full loan 83 //Create a listing for each month 85 for (int month = 1; month

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!