Computer Science - Object Oriented Programming Using C++

6. 

The return type you code for all constructors is _____

A. void
B. the class type
C. the same type as the first data member defined in the class
D. no type

Answer: Option D

Explanation:

No answer description available for this question. Let us discuss.

7. 

When an object-oriented program detects an error within a function, the function _________

A. throws an exception
B. throws a fit
C. catches a message
D. catches an exception

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.

8. 

Using a statement at the wrong time or with an inappropriate object creates a

A. logical error
B. syntax error
C. compiler error
D. language error

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.

9. 

When you create a derived class and instantiate an object _____

A. the parent class object must be constructed first
B. the child class object must be constructed first
C. the parent class object must not be constructed
D. the child class object must not be constructed

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.

10. 

Evaluate the following expression: 4 >6 || 10 < 2 * 6

A. True
B. False

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.