Project #6 – Amy’s Auto Loan Payments
1 Problem Overview
You are a consultant doing work for Amy’s Autos, a small car dealership. Amy wants a program that lets her staff enter basic loan data (amount, interest rate) and show the potential buyer various financing options, including a report showing a monthly payment breakdown.
2 User Interface
2.1 Initial Input
The user is first asked for the loan amount and annual interest rate: Enter loan amount, example 10000:
20000 Enter annual interest rate, example 2.9:
These are used for all further calculations.
2.2 Input Menu
The user is then shown a menu offering various loan terms from which they can choose
Amy's Auto - Loan Report Menu
Once the user chooses a loan term option from the menu, they get a nicely formatted report showing one line per payment the buyer will make (abbreviated for space’s sake, here):
Once the user presses <Enter>, the menu of term options is once again displayed.
3.1 Call Hierarchy
|main||none||none||· Calls inputLoanData to gather loan info· Sets up a loop that calls functions that display the menu and chosen reports· The loop ends when it sees the menu return a loan term of 0 months|
|inputLoanData||none||Loan amount1,Interest rate per period||· Asks the user for the basic loan info|
|showMenu||none||Number of periods||· In a loop, displays the loan term menu and asks for a user choice· If the user makes a valid choice, it returns the number of periods· If the user makes an invalid choice, the menu simply displays again· If the user chooses the Exit option (choice 0), it returns a loan period of 0 months as a signal to the callingfunction that the user wants out|
|payment||PV, Rate per period2, Numberof periods3||Payment amount||· Calculates the payment as shown in the Calculations section below|
|showReport||PV, Rate per period, Number of periods, Payment amount||None||· Displays an attractive, aligned report showing the payment breakdown (which it calculates as shown below)· After the report, displays a message asking the user to press <Enter> to continue|
1 This is also used as PV, the present value of the loan.
2 This is also known as the periodic interest rate.
3 We’re talking about monthly payments, so for our purposes “periods” = “months” throughout this project.
Here are the key calculations you’ll need to use:
𝑃 = 1 − (1 + 𝑟)−𝑛
Adjust the last payment, principal, and balance to take care of any small amount left after the last payment has been calculated (note the last line of the report above). Sum the payments and display that result at the bottom of the report (as shown above).
5 Code Specifications
every line needs a comment; think about describing a block of related code.
you’re up for the challenge. Don’t use tabs and spaces for alignment; you know better, now.
At the bottom of your program, add comments that answer these questions:
to fix as you learn more?
9 Grading Matrix
|Plain (non-looping) menu||20|
|Add looping menu||20|
DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of