Java Reference
In-Depth Information
Tutorial Results
Let's go over the results:
1.
In the Tutorials project, a new package called c6.
2.
In c6, new classes called CondTestApp, StringCompApp, CBTestApp, AppOptions, TNT,
AppOptionsSwing, and TNTSwing.
3.
A new method in Employee called fedTaxCalc.
4.
Changes to the EnterEmpInfo class as explained in the tutorials.
5.
A printout of the CondTestApp and StringCompApp source code.
Review Questions
Here are the review questions:
1.
Explain the difference between the System.exit and dispose methods.
2.
What is the difference between the following two operators =, = = ?
3.
What is the thread stack?
4.
What is a runtime error? Give examples of what could cause a runtime error.
5.
What does an event's getSource method do?
6.
Explain the relationship between an ActionListener, a Button, an ActionEvent, and an
actionPerformed method.
7.
What are the differences between stand-alone checkboxes and checkboxes that have been
assigned to a checkbox group?
8.
Explain the difference between primitive and reference variable comparisons.
9.
Describe the function of the plus sign (+) when used with numeric values versus
character values.
10.
What are the advantages and disadvantages of using AWT versus Swing?
Review Exercise:
In this exercise, you will create two new frames called EnterShipNum (see Figure 6-14 ) and Ship-Options (see Figure 6-15 ).
ShipOptions will provide choices to enter or display shipment information. When a user chooses the Display Shipment
Information option, they will be prompted to supply the shipment number (i.e., the EnterShipNum will be displayed).
When someone chooses the Enter Shipment Information option, the EnterShipInfo frame will be displayed.
The flow between the new and old frames can be seen in Figure 6-23 . (Note that thumbnail images of the new
frames appear to the right of the I/O operation that displays the frame.)
 
Search WWH ::




Custom Search