Java Reference
In-Depth Information
The main screen, as shown in Figure 9-1a on the previous page, allows a user to
enter a password and then choose one of three options: (1) add a new password,
(2) change an existing password, or (3) use a current password. A series of dialog
boxes display results of successful or unsuccessful actions, such as adding a new
password (Figure 9-1b), changing a password (Figure 9-1c), entering an invalid
password (Figure 9-1d), using an existing password successfully (Figure 9-1e),
trying to use a password that has already expired (Figure 9-1f), or using a pass-
word that soon will expire (Figure 9-1g). Each of these dialog boxes is displayed
as the result of testing a different logical path in the Password class.
Program Development
The six development cycle phases and corresponding tasks for the Password class
are shown in Table 9-1. You should note that, in object-oriented development,
these tasks are often iterative , or repeating — particularly with regard to the
design, implementation, and testing tasks.
Table 9-1 Password Class Development Tasks
DEVELOPMENT PHASE
TASK(S)
1
Analyze the requirements
Analyze the Password class problem.
2
Design the solution
Design the logic to solve the problem.
3
Validate the design
Confirm with the user that the design solves
the problem in a satisfactory manner.
4
Implement the design
Translate the design into code. Include
internal documentation (comments and
remarks) within the code that explains the
purpose of the code statements. Design and
code the user interface program used for
testing the Password class.
5
Test the solution
Using the test program, test the Password
class. Find and correct any errors (debug) until
it is error-free.
6
Document the solution
Print copies of the Password class code and
the test program code.
Analysis and Design
Figure 9-2 shows the requirements document that initiates the development
cycle for the Password class. This document illustrates that a request can come
from within the computer systems or information technology department, as
well as from end users. Typically, this will happen when the request is for soft-
ware to support the development of other applications, as is the case with the
Password class.
 
Search WWH ::




Custom Search