Java Reference
In-Depth Information
Results of the Review Exercise
Below are the results:
1.
In ReviewExWeb/Java Resources, there is a new folder called c10.
2.
c10 should contain 24 classes.
3.
Modifications to Shipment such that the CRUD functions are available.
4.
Changes to the Shipment application such that inserts, deletes, and updates can
be performed on the shipment table and shipment information is displayed on
ShipmentFrame.
Check that the Exercise Was Done Correctly
Let's check if everything is working:
1.
Run TNT and insert the following information for a shipment: employee 222, shipment
number 1000, supplier Fred Meyers, and the current date and time.
2.
Choose the display function, specify shipment number 1000, and verify the information
is displayed.
Notice that the message text does not fit in the labels and there are extra spaces following the shipment number.
These problems will be addressed in the Challenge Exercise.
3.
Close the ShipmentFrame window.
4.
Choose the update function, specify shipment 1000, and change the employee number
to 111.
5.
Choose the display function, specify shipment 1000, and verify that employee number
111 is displayed.
6.
Close the ShipmentFrame window.
7.
Choose the delete function and specify shipment 1000.
8.
Choose the display function and specify shipment 1000. The following message should
be generated:
Problem getting ship info from result set java.sql.SQLException: Xxxxx xxxxx.
Because shipment 1000 was deleted, the result set returned by the select is empty. When Shipment tries to read
the result set (to put the values in the properties), we should check to see if the result set is empty. This is another
deficiency the Challenge Exercise will correct.
Challenge Exercise
Finally, let's try a challenge:
1.
Copy ReviewEx/c10 into CE (and, if using Access, copy TNTDB from ReviewEx).
2.
Change EnterShipInfo's empNumTF to a choice called empNumCh and have
EnterShipInfo populate the choice with Employee numbers from the employee table.
(Hint: copy the code from the EmpNumFrame class and modify as needed.)
 
Search WWH ::




Custom Search