Solved

When Identifying the Proper Instance Variables to Use in the Design

Question 88

Multiple Choice

When identifying the proper instance variables to use in the design of an inheritance hierarchy, how do you decide where in the hierarchy a variable should be placed?


A) Instance variables should only be declared in the superclass and then accessed using the super keyword.
B) Instance variables should only be declared in subclasses.
C) Instance variables that are common to all classes should be placed at the base of the hierarchy.
D) Instance variables that are relevant to only one class should be placed at the base of the hierarchy.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents