Java Reference
In-Depth Information
PP 11.3 Design and implement a program that creates an exception class
called InvalidDocumentCodeException , designed to be thrown
when an improper designation for a document is encountered
during processing. Suppose in a particular business all documents
are given a two-character designation starting with either U, C,
or P, standing for unclassified, confidential, or proprietary. If a
document designation is encountered that doesn't fit that descrip-
tion, the exception is thrown. Create a driver program to test the
exception, allowing it to terminate the program.
PP 11.4 Modify the solution to PP 11.3 such that it catches and handles
the exception if it is thrown. Handle the exception by printing an
appropriate message, and then continue processing.
PP 11.5 Modify the DisplayFile program from Chapter 10 to add a but-
ton labeled Save above the text area. When the button is pushed,
write the contents back out to the file.
PP 11.6 Modify the JukeBox program such that it plays a song immedi-
ately after it has been selected using the combo box. Combine
the two listeners into one.
PP 11.7 Modify the StyleOptions program from Chapter 5 so that it
uses a split pane. Orient the split pane such that the label is on
the top and the style check boxes are in the bottom. Add tool
tips to the check boxes to explain their purpose.
PP 11.8 Modify the PickImage program so that it presents several addi-
tional image options. Display the list within a scroll pane with a
vertical scroll bar that is always displayed. Display the image in a
scroll pane that uses both horizontal and vertical scroll bars, but
only when necessary.
PP 11.9 Design and implement an application that performs flashcard
testing of simple mathematical problems. Allow the user to pick
the category. Repetitively display a problem and get the user's
answer. Indicate whether the user's answer is right or wrong for
each problem, and display an ongoing score.
 
Search WWH ::




Custom Search