Why would a programmer specify a base-class type as the type of a catch handler, then throw objects of derived-class types?

What will be an ideal response?


This is a nice way to catch related types of exceptions, if they can all be handled with the same logic.

Computer Science & Information Technology

You might also like to view...

Match the following terms to their meanings:

I. Subtask II. Resource Sheet view III. Effort-driven scheduling IV. Crashing V. Leveling A. Related tasks that further define the summary tasks B. A process of correcting overallocated resources C. Adding additional resources to a project D. Formatted in columns and rows E. When the duration of a task is shortened as resources are added or lengthened as resources are removed

Computer Science & Information Technology

Color values for controls may be coded in several different ways.  Which type of color value represents color intensities of red, green, and blue instead of the color values ranging from 0-255?

A. RGB B. VB constant C. ColorIndex D. hexadecimal

Computer Science & Information Technology

Explain what a compound operator is, and what it consists of.

What will be an ideal response?

Computer Science & Information Technology

Kim, a network administrator, has made changes to the DHCP leasing setup for a given network and is expecting all devices to recognize the changes shortly. However, after a full week, none of the machines on the company network are grabbing new addresses with the new lease time. Which of the following is the problem?

A. The lease time on the original configuration was too long. B. The firewall was never configured to recognize the changes. C. The DHCP server was never restarted, so changes never took affect. D. The lease time on the original configuration was too short.

Computer Science & Information Technology