Object Oriented Programming - Object Modelling - 2

106:  
The general principle underlying object-oriented error handling is that a called function should
A.

neither check for, nor handle errors

B.
check for errors but not be required to handle any detected.
C.

handle errors, but not check for them

D.

both check for and handle errors.

 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here:



107:  
In object-oriented terms, an exception may be considered a(n)
A.

child

B.

encapsulation

C.

message

D.

scalar type

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



108:  

Within parentheses, catch blocks can have

A.

no arguments

B.

one argument

C.

two arguments

D.

as many arguments as necessary.

 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here:



109:  
When a function includes a throw statement for errors, the call to the potentially offending function should be placed with a block
A.

throw

B.

try

C.

catch

D.

scope

 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here:



110:  
Another drawback to returning an error code from a function is that, this error code returned by the function
A.
must be of the same type as return type of the function
B.

must not be a character

C.

cannot be checked in a main () program

D.

can have multiple meanings.

 
 

Option: A

Explanation :

Click on Discuss to view users comments.

Write your comments here: