Java Reference
In-Depth Information
Results of the Tutorial:
Let's look at the results:
1.
In the Tutorials project, a new package named c10.
2.
In Tutorials/c10, the following new Java classes:
DBAccess EmpNumFrame EmpOptions
3.
A printout of the DBAccess source code.
4.
In Tutorials/c10, the following Java classes copied from c7 and c9:
AppOptions Employee EmployeeFrame
EnterEmpInfo ExitButton TNT
TNTButton UsefulFrame
5.
The employee application can now insert, display, and update employee information
in a database.
Review Questions
1.
What is a result set?
2.
What is a driver?
3.
In a result set, what is the function of the cursor?
4.
What is the purpose of data encapsulation?
5.
What is SQL's function regarding databases?
6.
What is the purpose of the result set's next method?
7.
What is CRUD?
8.
Explain the term “data persistence”?
Review Exercise
You will modify the Shipment application to insert, update, display, and delete shipment information in a DBMS.
In addition, the Enter Shipment Information frame will offer the capability to delete and update shipment information.
To perform all this, the ShipOptions class must be modified to pass the selected function to EnterShipNum.
EnterShipNum will receive the shipment number entered by the user and create a Shipment object for that shipment
number. EnterShipNum will pass the selected function and the Shipment object to EnterShipInfo. EnterShipInfo
will display the correct button text (insert, delete, etc.). The Shipment class will accept a shipment number, access
the database for that shipment's information, and populate the Shipment object's properties with the database
information. Shipment will also be modified to provide all the CRUD functions.
1.
In ReviewEx, create a new folder called c10.
2.
Copy all the files in c7 into c10.
 
Search WWH ::




Custom Search