Java Reference
In-Depth Information
Program Development
The program development cycle and corresponding tasks for this project are
shown in Table 11-1.
Table 11-1 StockTrackerDB Class Development Tasks
DEVELOPMENT PHASE
TASK(S)
1
Analyze the requirements
Analyze the prototype stock-tracking application
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 applications
used for creating the database structure and for
accessing the database and presenting the data
to the user.
5
Test the solution
Test the application for creating the database
and then test the application for accessing both
user and stock data. Find and correct any errors
(debugging) until they are error-free.
6
Document the solution
Print copies of all source code, including the
database creation program code.
Analysis and Design
Figure 11-2 shows the requirements document that initiates the
development cycle for the StockTrackerDB class. This document illustrates
that a request may require programs to initialize the application environment,
as is done with the creation of a database.
PROBLEM ANALYSIS The problem of providing a means of retaining
information about users and their respective stocks and providing access only
to authorized users is solved by a GUI, StockTracker. Access to a database is
obtained through a data access class, StockTrackerDB. Access is controlled by
means of a user ID and a password, both of which are contained in a database
along with the associated user first name, last name, and stock information. The
database maintains a relationship between a user and the stocks held by that
user. Further, users with administrative access will perform user maintenance
functions, such as adding new users and deleting, updating, and listing current
users. A third class, MakeDB, creates the database structure and initializes the
database with data for a single, known record, so the database is accessible by the
GUI application. Because a Microsoft Access database is used, the Windows
environment must be configured to make the database accessible to the
programs that interact with it.
 
Search WWH ::




Custom Search