S308 Calculator技术难点
Posted jetm8mtc
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了S308 Calculator技术难点相关的知识,希望对你有一定的参考价值。
S308 Assignment 5 – Car Loan Calculator
The Kelley Car Company wants to create an application to help potential customers calculate and
understand the car loan options they have available. The application must allow a user to enter the
amount of the desired loan, an interest rate, and the term of the loan then calculate the monthly
payment. Customers have also requested to know the total cost and total interest they should expect.
Kelley Car Company has mocked up an interface of what they think the application might look like
which is provided below. Consider this to be a starting place and good illustration of the information
and functionality they expect in the end product.
Important!
This is an individual assignment. Students are NOT allowed to work together or seek help from
anyone else including current and former S308 students. Any questions about the assignment
should be sent to the instructor. Anyone found to have received help from another person will
receive a zero (0) for the assignment and will be reported for academic misconduct.
Requirements:
The purpose of this assignment is to practice object oriented programming and integrate our new
skills with creating desktop applications. Accordingly, you will need to do the following:
- Create the GUI with a) input controls for the 3 loan parameters (principal in USD, interest
rate, and term in months), b) a button that calculates the desired output and a clear button,
and c) a group of output controls for the calculated variables (payment, total cost, interest). - Create a class Loan with a) 3 properties for the loan parameters (along with their
corresponding get and set accessors) and b) 3 methods to calculate the variables called
CalcPayment, CalcTotalCost, and CalcInterest that take no input arguments and return a
double with the calculated results. - When your Calculate button is clicked, your program a) instantiates an object from the Loan
class with the input parameters from the user, b) calculates the output variables using the
classes methods (storing them in variables), and c) outputs the values of the calculated
variables to the GUI.
Formulas:
Monthly Payment
M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1]
M = monthly payment
P = principal
i = monthly interest (interest rate / 12)
n = number of months
Total Cost
TC = M * n
Total Interest
TI = TC – P
Grading Notes:
Name your file _A5.zip where is your IU Network ID
All applicable grading criteria from previous assignments will be applied to this assignment.
Including but not limited to:
o Assignment opens and runs without error
o Well-designed user interface with appropriate controls, proper naming, labels,
title/instructions, tab order, etc.
o Proper coding practices including organized clean code and good data type choices
Thoroughly test all validation conditions.
Thoroughly test all output.
Testing:
A variety of loan calculators with amortization tables are available online. These can be used for
testing your results.
WX:codehelp
以上是关于S308 Calculator技术难点的主要内容,如果未能解决你的问题,请参考以下文章
Arcgis中用raster calculator怎样 计算山的顶点,应怎样编写
线程“主”java.lang.ArrayIndexOutOfBoundsException 中的异常:Calculator.main 中的 0(Calculator.java:25)[重复]
typescript 开发人员日记:第1天 - packages / server / src / calculator / calculator.ts