Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please include an explanation line before each section.. Programming Assignment 2 Due 2/16/2020 100 points Saved to my Mac Objective: This assignment will exercise what

Please include an explanation line before each section.. image text in transcribedimage text in transcribedimage text in transcribed

Programming Assignment 2 Due 2/16/2020 100 points Saved to my Mac Objective: This assignment will exercise what you have learned in Chapter 3 and previous chapters using methods. As with previous assignments, you should build and run your program testing it with different possible inputs providing the output requested. You may use an online calculator for car loans to compare with your results. You must use methods in this assignment. Failure to do so will result in points deducted. You will also want to research the topic a little and gather understanding. Task: Write a program that calculates and prints payment options, interest paid and total payout for a car loan, which typically uses simple interest. The program asks user to enter values for interest rate (yearly) and amount of loan (principal). It will output the monthly payment the borrower will need to pay for two scenarios: 3,4, or 5 year loans. It should also output the total amount the borrower will have paid when the car is paid off. This website provides a good explanation of how car interest works and provides the following formula. The formula for monthly payment is: interest rate 12 months x principal Monthly Payment = (1-(1 (-number of months) + interest rate 12 months :) The formula for total amount accrued is described here. Amount = Principal * (1 + (interest rate * number of years)) Amount = Principal * (1 + (interest rate * number of years)) Write the following 7 methods: input(2), calculation(2),display(2), and Main(). 1. Input method prompts user to enter the yearly interest rate and returns a double representing the percentage as a decimal (e.g. 90% = 0.9). 2. Input method prompts user to enter the amount of the loan without formatting (no commas) and returns a double. 3. Calculation methods (2) a. Monthly payment The input parameters of calculation method are interest rate, principle, and term in years. This method will calculate the monthly payment needed. b. Total Amount The input parameters should be interest rate, number of years, and principle. The method calculates and returns the total payout corresponding to its input parameters. 4. Display method: This method will be called by the main method. It will print out the monthly payment and total amount paid for the 3, 4, and 5 year loan options. This will call the input methods to get interest rate and principal. This will also call the DisplayPaymentOption() method for each of the payment options of 3, 4, or 5 years. 5. DisplayPaymentOption method: This method will be called by the Display method for each of the payment options. It will take term of loan (years), interest rate and principal amount as inputs. Note, this should call the calculation methods providing the years, interest rate, and principal amount. Your Main() will call the input and display method. Your Main() will call the input and display method. Payment CalculatorApp + Main() - Display () - DisplayPaymentOption() - GetYearlyInterestRate() - GetLoan Principal() - Calculate MonthlyPayment() - Calculate TotalPayout() NOTE: Please name your solution Assignment2. Name your class PaymentCalculatorApp and rename your Program.cs file to PaymentCalculatorApp.cs. Evaluation 1. Input Method for interest exists and returns a double value representing the decimal value of interest, 10 points 2. Loan amount Input Methods exist and returns double values 10 points 3. Monthly Calculation Method exists, has appropriate input parameters and returns a double value - 10 points 4. Total Amount Calculation Method exists, has appropriate input parameters and returns a double value - 10 points 5. Display Method exists and displays appropriate monthly payment and total amount values for 3,4, and 5 year terms 20 points 6. Proper Main() method, calls the appropriate methods 10 points. 7. Monthly calculation is correct 5 points. 8. Total amount calculation is correct 5 points. 9. Output formatting is correct 10 points. 10. Comments and Follows Coding Standards (Proper capitalization for methods and variables) 10 points. Programming Assignment 2 Due 2/16/2020 100 points Saved to my Mac Objective: This assignment will exercise what you have learned in Chapter 3 and previous chapters using methods. As with previous assignments, you should build and run your program testing it with different possible inputs providing the output requested. You may use an online calculator for car loans to compare with your results. You must use methods in this assignment. Failure to do so will result in points deducted. You will also want to research the topic a little and gather understanding. Task: Write a program that calculates and prints payment options, interest paid and total payout for a car loan, which typically uses simple interest. The program asks user to enter values for interest rate (yearly) and amount of loan (principal). It will output the monthly payment the borrower will need to pay for two scenarios: 3,4, or 5 year loans. It should also output the total amount the borrower will have paid when the car is paid off. This website provides a good explanation of how car interest works and provides the following formula. The formula for monthly payment is: interest rate 12 months x principal Monthly Payment = (1-(1 (-number of months) + interest rate 12 months :) The formula for total amount accrued is described here. Amount = Principal * (1 + (interest rate * number of years)) Amount = Principal * (1 + (interest rate * number of years)) Write the following 7 methods: input(2), calculation(2),display(2), and Main(). 1. Input method prompts user to enter the yearly interest rate and returns a double representing the percentage as a decimal (e.g. 90% = 0.9). 2. Input method prompts user to enter the amount of the loan without formatting (no commas) and returns a double. 3. Calculation methods (2) a. Monthly payment The input parameters of calculation method are interest rate, principle, and term in years. This method will calculate the monthly payment needed. b. Total Amount The input parameters should be interest rate, number of years, and principle. The method calculates and returns the total payout corresponding to its input parameters. 4. Display method: This method will be called by the main method. It will print out the monthly payment and total amount paid for the 3, 4, and 5 year loan options. This will call the input methods to get interest rate and principal. This will also call the DisplayPaymentOption() method for each of the payment options of 3, 4, or 5 years. 5. DisplayPaymentOption method: This method will be called by the Display method for each of the payment options. It will take term of loan (years), interest rate and principal amount as inputs. Note, this should call the calculation methods providing the years, interest rate, and principal amount. Your Main() will call the input and display method. Your Main() will call the input and display method. Payment CalculatorApp + Main() - Display () - DisplayPaymentOption() - GetYearlyInterestRate() - GetLoan Principal() - Calculate MonthlyPayment() - Calculate TotalPayout() NOTE: Please name your solution Assignment2. Name your class PaymentCalculatorApp and rename your Program.cs file to PaymentCalculatorApp.cs. Evaluation 1. Input Method for interest exists and returns a double value representing the decimal value of interest, 10 points 2. Loan amount Input Methods exist and returns double values 10 points 3. Monthly Calculation Method exists, has appropriate input parameters and returns a double value - 10 points 4. Total Amount Calculation Method exists, has appropriate input parameters and returns a double value - 10 points 5. Display Method exists and displays appropriate monthly payment and total amount values for 3,4, and 5 year terms 20 points 6. Proper Main() method, calls the appropriate methods 10 points. 7. Monthly calculation is correct 5 points. 8. Total amount calculation is correct 5 points. 9. Output formatting is correct 10 points. 10. Comments and Follows Coding Standards (Proper capitalization for methods and variables) 10 points

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

Statistical And Scientific Database Management International Working Conference Ssdbm Rome Italy June 21 23 1988 Proceedings Lncs 339

Authors: Maurizio Rafanelli ,John C. Klensin ,Per Svensson

1st Edition

354050575X, 978-3540505754

More Books

Students also viewed these Databases questions

Question

3. Describe the communicative power of group affiliations

Answered: 1 week ago