Answer the following statements true (T) or false (F)
1. Compilers will check code in functions against exception specifications.
2. A function declared thus: void func(argument_list) throw(); should throw no exception of any type.
3. The default action of unexpected() can be changed.
4. Mentioning a base class B in an exception specification includes a class D objects, where D is derived from B, in the exception specification.
1. False.
Some C++ compilers attempt this (Borland), but in general in C++, this must be done at runtime.
2. True
This is an empty list, which says no exceptions should be thrown. Contrast this with a function that has no exception specification which means an exception of any kind may be thrown.
3. True
This is mentioned in the text, where it is suggested that you need to be aware of this, but only states you need to consult a more advanced text.
4. True
An object of class D where D is derived from class B is an object of class B. Hence including class B in the exception list allows class D objects to be thrown..
You might also like to view...
Write a GUI that will let the user sample borders. Include a menu named Borders that offers three options—beveled border, etched border, and line border—as submenus with the following options:
• Beveled-border submenu options: raised or lowered. • Etched-border submenu options: raised or lowered. • Line-border submenu options: small, medium, or large. Each of these options should be a submenu with three color options: black, red, and blue. Put the borders around a label containing text that describes the border, such as Raised Border, Lowered Etched Border, and so forth. Fix the highlight and shadow colors for the etched-border options to whatever colors you like, and make the small line border 5 pixels wide, the medium one 10 pixels wide, and the large one 20 pixels wide. This Programming Project is fairly easy, especially if done a step at a time. First create the menu hierarchy, then add the lines in the actionPerformed method to set the border style and change the label’s text, depending on the style selected. Note that setActionCommand is used to differentiate selections with the same text (e.g. “Raised” could be either Beveled or Etched).
Write structured pseudocode to show the following: wash and dry your face if is dirty.
What will be an ideal response?
Where is the best place to look for evidence that a person has been using webmail?
A) \Documents and Settings\Windowsuserid\Local Settings\Internet Files B) \Documents and Settings\Windowsuserid\Local Settings\Temporary Internet Files C) \Documents and Settings\Windowsuserid\Local Settings\Temp D) \Documents and Settings\Windowsuserid\Local Settings\Temporary Files
A JPG image is a complex data structure containing compressed DCT coefficients for ____ blocks of pixels.
A. 4x4 B. 8x8 C. 16x16 D. 32x32