Compare and contrast exception handling with the various other error-processing schemes discussed in the text.

What will be an ideal response?


Exception handling enables the programmer to build more robust classes with built-in error-processing capabilities. Once created, such classes allow their clients to concentrate on using the classes rather than defining what should happen if an error occurs. Exception handling also allows a program that should not continue to exit in a controlled manner, returning any resources that it might have obtained, therefore preventing possible resource leaks, and it allows the program to display meaningful messages about the problem, instead of just terminating. Exception handling provides a single, uniform technique for processing errors; this helps programmers working on large projects understand each other’s error-processing code.

Computer Science & Information Technology

You might also like to view...

The basic rules that apply to DFD development are: • Each context diagram must fit on one page. • The process name in the context diagram should be the name of the information system. • Use unique names within each set of symbols. • Do not cross lines. • Use a unique reference number for each process symbol. In addition to these rules, the systems analyst must use the proper DFD shapes, connect them correctly, and produce a leveled, balanced set of DFDs.

What will be an ideal response?

Computer Science & Information Technology

The electronic landscaping company would like users to be able to customize their brick walls. Modify the Brick Wall application so that the user can enter the number of rows and columns of their brick wall.


a) Copying the template to your working directory. Copy the C:Examples Tutorial20ExercisesEnhancedBrickWall directory to your C:SimplyJava directory.
b) Opening the Brick Wall template file. Open the template file BrickWall.java in your text editor.
c) Declaring and initializing local variables. Inside the drawJButtonActionPer- formed method (starts at line 125), declare an int variable named numberOfRows. Initialize this variable by using the parseInt method to get the value the user enters in the rowsJTextField. Then declare the second int variable named numberOfCol- umns, which is initialized to the value in the columnsJTextField.
d) Calling the drawBricks method. After the variable declarations that you added in Step c, call the drawBricks method, which takes the two integers you just declared as arguments. Remember, since the drawBricks method is in a separate class, you will need to utilize drawingJPanel (declared as an instance variable in line 16), followed by the d

Computer Science & Information Technology

Instructions that tell a computer what to do are called _________

Fill in the blank(s) with correct word

Computer Science & Information Technology

Use the _______________ property to eliminate the bullets from an unordered list

a. bullet-image b. list-style-none c. list-style-type d. list-style-image

Computer Science & Information Technology