Java Reference
In-Depth Information
Analysis and Design
REQUEST FOR NEW APPLICATION
occurs. The class should provide a means for user programs to obtain this
count. The count should be reset to zero when a valid password is used
successfully.
Figure 10-2 shows the
requirements document that
initiates the development cycle for
the PasswordException class and
subclasses, along with the StockList
demo program. This document
illustrates that a development
request may require enhancements
to existing programs, rather than
building an entirely new program.
For object-oriented software,
adding enhancements to existing
programs often involves creating
new classes, which also may require
extending either new or existing
classes.
5. All password exceptions must have a default constructor and a
constructor that requires only a String message, except for size exception
and internal exception.
6. The password size exception constructor must require a String
message, the current password size, the maximum password size, and the
minimum password size as parameters. It must have no default
constructor.
7. The password internal exception constructor must require a String
message only and have no default constructor.
8. The test application used to test the classes outlined above should be a
multiple window stock list application that allows a user to log on to the
application using one window and then enter stocks into a list using a
stock window. Only one window at a time should display to the user.
When the user logs out of the stock window, the logon window should
be redisplayed.
9. When a class generates a password exception, the test application
should display appropriate error messages to users, indicating the type of
password exception generated.
Approval Status:
X
Approved
Rejected
Approved by:
Wilson Davis , Director of IT, AccessFour Software
Date:
December 5, 2007
Assigned to :
M. Mick, Programmer
REQUEST FOR NEW APPLICATION
Date submitted:
December 3, 2007
Submitted by:
Mark Allen, Staff Senior Systems Analyst, AccessFour Software
Purpose:
We have a need for applications to be able to differentiate between the
various exception conditions generated by the Password class. Presently,
when a password expires or an invalid password is used, an exception is
generated. An application using the Password class, however, currently
cannot determine if the generated exception is due to expiration or to an
invalid password value.
We also have a need for an application to test the new classes required to
support the functionality described above. The test application should be
a multiple window stock list application, similar to a stock application
that later will incorporate these classes.
Application title:
PasswordException classes
Algorithms:
None specified.
Notes:
1. An application using the Password class currently cannot determine if
the generated exception is due to expiration or to an invalid password
value. Any new classes should provide functionality so that when a
password expires or an invalid password is used, an exception is
generated. If the exception is due to expiration, the user should be
allowed to log on and change his or her password. If due to an invalid
value, the user should be denied access.
2. All password exception objects must be specific to the type of
exception generated. All password exceptions should implement a
method describing their usage. This method should return a String that
could be used as an informational message by a user program. There
should be a common, generic reference for all password exceptions;
however, no generic password exception objects are to be used in the
programs.
3. Programs must be notified of the following password exceptions
generated by the Password class when:
a. the Password class generates an exception due to an expired
password.
b. the Password class generates an exception due to an invalid
password. This is an entered password that does not match the
value of the current password.
c. the Password class generates an exception due to an invalid
password format. This is considered a type of invalid password.
d. the Password class generates an exception due to an invalid
password size. The current password size, as well as the
maximum and minimum sizes allowed should be available to the
exception handler. This is considered a type of invalid password.
e. the Password class generates an exception due to the password
being in the list of recently used values.
f.
the Password class generates an exception due to an internal
problem with storing the password list. This type of exception is
not extensible.
4. A count of invalid password attempts must be provided. This count is
incremented automatically each time an invalid password exception
FIGURE 10-2
Search WWH ::




Custom Search