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.
Correct Answer:
Verified
Q34: A method must be declared
_ for it
Q35: Using protected instance variables can cause derived-class
Q36: A "copy-and-paste" approach is a simple and
Q37: private fields of a base class can
Q38: The first task of any derived-class constructor
Q40: Derived classes provide the functionality and features
Q41: A base class is often designed by
Q42: When creating derived classes,you must use discretion
Q43: If a base class constructor is overridden,the
Q44: Which of the following statements is (are)true
A.We
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents