Solved

When Identifying the Proper Instance Variables to Use in the Design

Question 93

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