Which of these exception specifications is correct, and why?

Suppose we have the class definitions, where the exception specification is as listed below:
```
class B { public: virtual void f() throw(int, double); }; class D:public B { public: virtual void f() //The exception specification you
//choose from the list goes here.
};
```
a) Use no exception specification.
b) throw ( )
c) throw(int)
d) throw(int, double)
e) throw(int , double, string)
f) throw(double);
g) None of these, because you can’t derive from a class where member functions have exception specifications.


b) throw ( ) , c) throw(int) , d) throw(int, double) , and f) throw(double);

a) Use of no exception specification conflicts with base class specification.
b) throw(int); //OK, more restrictive than base spec
c) throw(int, double); //OK, same as base class spec
d) throw(int, double, char);//error: conflicts with base
//class specification.
f) throw(double); //OK, more restrictive than base spec


Computer Science & Information Technology

You might also like to view...

____ Notes are notes directed to other content creators who are working on different parts of your site.

A. Content B. Development C. Design D. HTML

Computer Science & Information Technology

If the underlying data for a PivotTable changes, you must ________ the PivotTable to show the changes

Fill in the blank(s) with correct word

Computer Science & Information Technology

Consider where x = 12.1234 and y = 12.1111. If arithmetic operations are carried out to six decimal significant figures , does it matter whether you evaluate this expression as or (x + y)(x ? y)?

What will be an ideal response?

Computer Science & Information Technology

The String class ____ method evaluates the contents of two String objects to determine if they are equivalent.

A. equals() B. toString() C. charAt() D. replace()

Computer Science & Information Technology