Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me with this and read all instructions/rubric thoroughly: CSIS 112: Lab #1 Customer Loan Payments: Amortizing a Loan As a newly hired employee

Please help me with this and read all instructions/rubric thoroughly:

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

CSIS 112: Lab \#1 Customer Loan Payments: Amortizing a Loan As a newly hired employee of WePaintHouses LLC, your first assignment will give you some practice with the new concept of recursion. This project will also serve to get you back into programming and will utilize many of the C++ topics that you should be familiar with from your previous coursework! Remember that concepts such as documentation, integrity statements, and modularity are all gradable components of every project you complete. Overview: One of the inefficiencies that WePaintHouses LLC has identified in their business model starts with potential clients. Many of their clients need a decent amount of financing, and at the moment the accounting department is helping clients calculate everything by hand. WePaintHouses LLC gives loans to certain clients who need additional help funding the work required. Note: Not every job is large enough to require a loan, and many smaller customers who only need one or two rooms painted will not need this program. However, the company does have several larger clients that work in rental properties and apartment complexes, and the work required for this scale of project typically requires financing! You have been tasked with developing a tool to assist the loan officers in the accounting department when making sure clients are aware of their options. This application should determine an unchanging monthly loan payment that the client would be expected to pay each month, then produce an amortization schedule for the lifetime of the Ioan. Note that WePaintHouses LLC ONLY allows clients to choose between 5-, 10-, and 15- year fixed loans. Inputs In order to calculate the proper schedule, you will need to prompt the user of the program for the amount being borrowed (called the principal of the loan), the annual interest rate, and the number of years that the loan will be outstanding. Remember that this program will be used by the loan officer specifically, not the client. Also, since only three different terms are available, your program should not allow for any other terms to be entered. Formulas Before you can calculate the payment schedule, you will first need to calculate the constant monthly payment. We can use the following formula, [Adapted from Wittwer, J.W., "Amortization Calculation," From Vertex42.com, Nov 11, 2008.], to calculate the monthly payment for a fixed interest rate loan: A=P(1+r)n1r(1+r)nA=MonthlyPaymentP=Amountbeingborrowed(calledprincipal)r=Interestrateperperiod n= Total number of payments or periods Note: You will have prompted the user for the number of years that the loan will be outstanding but remember that this loan will need to be paid MONTHLY. To get n, you will need to convert that yearly amount! Your interest rate (depending on how you bring that in from your user) may also need to be converted to decimal form as well as to a monthly value. Example: What would the monthly payment be on a 15 -year, $100,000 loan with a 4.50% annual interest rate? P=$100,000r=4.50%peryear/12months=0.375%(or0.00375)perperiodn=15years12months=180totalperiodsA=100,000(1+0.00375)18010.00375(1+0.00375)180 Using these numbers in the formula above yields a monthly payment of $764.99. Hint: It would be a really good idea, when you first run your program, to test with these values to make sure you get the correct payment amount! If not, your math is wrong somewhere, and you probably need to check your order of operations. Amortization Schedule Press any key to continue... Note: The ellipses (...) in the middle of this chart are NOT required to be implemented in this lab (although you may impress me if you want). These have been included here in order to show the necessary results in a screenshot. So how do you calculate the Interest? Well, for a monthly payment, the interest is going to be calculated by taking the amount you currently owe and multiplying it by the monthly interest rate (in the example above, 0.00375 ). This should be rounded to the nearest cent. Note that this amount changes each period, as the amount owed goes down with each payment. Now that you've calculated the amount and the interest, you need to calculate the Principal column. This column simply refers to the amount of your payment that goes towards paying off the balance. Note that this is NOT the whole monthly payment amount, as you first have to pay for interest. Therefore, this can be calculated by taking the monthly payment and subtracting the interest for this month. Finally, you can now calculate your Balance by taking your previous balance minus the principal. Requirements: Based on the above specifications, there are a few other programming features that will be required in order to succeed in this assignment, demonstrating an understanding of formatting, recursion, formulas, functions, and input error checking. Make sure to review this list thoroughly before submission! 1. Your program should first prompt your user for a principal amount (how much money is to be borrowed). Since this is a dollar amount, what data type makes the most sense here? You need to confirm that the number entered by the user is both positive and a numeric value (make sure that the program does not go into an error state based on erroneous data!). 2. When you prompt the user for an interest rate, they should be asked to enter it as an annual interest rate percentage. In other words, you cannot skip steps by asking the user to calculate and enter the monthly decimal value. In the above example, you would have prompted the user and received 4.5 as the annual interest rate, then your program should do all conversions to switch that to a monthly decimal value. Thinking again of error checking, because non-numeric or negative interest rates will not make sense here. 3. For your third input, the user should be asked to enter the term of the loan, for which there are only three value options. Any value that is not 5,10 , or 15 years should be rejected. 4. For invalid inputs, you have a design choice to make. Does it make sense for the program to quit entirely when an unsuccessful value is entered, or should the user be re-prompted? Your comments should reflect your design choice and why you felt this behavior was the most appropriate for this application. 5. After receiving all inputs, your program should successfully calculate the loan's monthly payment. This must be done through a function that will receive the principal, interest rate, and number of years as its' parameters. Make sure you name this function appropriately, such as PaymentCalculator(). This function must return the calculated monthly payment value. 6. Now that you have the monthly payment calculated, your next function should be called from main() to create your amortization schedule. The following specifications are required for this function: a. Call your function Amortize. This function should receive the following parameters (no more, no less, although you may name your parameters as you see fit as long as I can follow your logic with documentation): curPeriod, totPeriods, payAmount, monthIntRate, curBalance. b. The goal of this lab is to demonstrate recursion. Therefore, your function must be recursive to receive credit for this lab. c. The schedule should be printed to the screen from this function. 7. Finally, formatting and documentation are VERY critical for successful code. Your final output should look very, very similar to the screenshot above (minus the ellipses between payments). Before calling the Amortize function, you should print out the initial calculation values as well as the payment amount. All columns need to be aligned appropriately, and you should show the proper number of decimals on all values. Your variables need to be named appropriately, you must have comments throughout, and you must check for invalid data. Make sure you are practicing professional programming techniques! To give you an idea of the criteria that will be used for grading, here is a checklist that you might find helpful

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

Intelligent Databases Object Oriented Deductive Hypermedia Technologies

Authors: Kamran Parsaye, Mark Chignell, Setrag Khoshafian, Harry Wong

1st Edition

0471503452, 978-0471503453

More Books

Students also viewed these Databases questions

Question

b. A workshop on stress management sponsored by the company

Answered: 1 week ago