Java Reference
In-Depth Information
Testing ensures that the code meets the requirements specification and weeds out bugs. An
independent team of software engineers not involved in the design and implementation of the
product usually conducts such testing.
Deployment makes the software available for use. Depending on the type of software,
it may be installed on each user's machine or installed on a server accessible on the
Internet.
Maintenance is concerned with updating and improving the product. A software
product must continue to perform and improve in an ever-evolving environment. This
requires periodic upgrades of the product to fix newly discovered bugs and incorporate
changes.
To see the software development process in action, we will now create a program that
computes loan payments. The loan can be a car loan, a student loan, or a home mortgage loan.
For an introductory programming course, we focus on requirements specification, analysis,
design, implementation, and testing.
testing
deployment
maintenance
VideoNote
Compute loan payments
Stage 1: Requirements Specification
The program must satisfy the following requirements:
It must let the user enter the interest rate, the loan amount, and the number of years
for which payments will be made.
It must compute and display the monthly payment and total payment amounts.
Stage 2: System Analysis
The output is the monthly payment and total payment, which can be obtained using the fol-
lowing formulas:
loanAmount
*
monthlyInterestRate
monthlyPayment
=
1
1
-
monthlyInterestRate ) numberOfYears * 12
(1
+
totalPayment
=
monthlyPayment
*
numberOfYears
*
12
So, the input needed for the program is the monthly interest rate, the length of the loan in
years, and the loan amount.
Note
The requirements specification says that the user must enter the annual interest rate, the
loan amount, and the number of years for which payments will be made. During analy-
sis, however, it is possible that you may discover that input is not sufficient or that some
values are unnecessary for the output. If this happens, you can go back and modify the
requirements specification.
Note
In the real world, you will work with customers from all walks of life. You may develop
software for chemists, physicists, engineers, economists, and psychologists, and of
course you will not have (or need) complete knowledge of all these fields. Therefore,
you don't have to know how formulas are derived, but given the monthly interest rate,
the number of years, and the loan amount, you can compute the monthly payment in
this program. You will, however, need to communicate with customers and understand
how a mathematical model works for the system.
 
 
Search WWH ::




Custom Search