Which statement is true when a base class has protected instance variables?

a) A derived class object can assign an invalid value to the base class’s instance variables,
thus leaving the object in an inconsistent state.
b) Derived class methods are more likely to be written so that they depend on the base
class’s data implementation.
c) We may need to modify all the derived classes of the base class if the base class
implementation changes.
d) All of the above.


d) All of the above.

Computer Science & Information Technology

You might also like to view...

What is the output of the following code, given the function definition below?

What is the output of the following code, given the function definition below? int a = 7, b = 12; tester (a, b); cout << a << “ “ << b; void tester (int m, int &n) // function definition { n = n - 2 * m; m = 2 * m; } a) 7 -2 b) 7 12 c) 14 -2 d) 14 12

Computer Science & Information Technology

What method is used to copy the contents of a string array or LINQ query into a text file?

(A) CreateTextFile (B) WriteAllLines (C) CopyToTextFile (D) ReadAllLines

Computer Science & Information Technology

Creating each interactive button from scratch can introduce ____________________ if you forget to include a certain feature or formatting.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

The class ____ is the base of the classes designed to handle exceptions.

A. class B. exception C. logic_error D. runtime_error

Computer Science & Information Technology