Which of the following statements about a class is correct?
A) A class should not have private instance variables.
B) Private instance variables are the interface to the class.
C) Private instance variables hide the implementation of a class from the class user.
D) Private instance variables should rarely be used in classes.
Correct Answer:
Verified
Q34: Consider the following code snippet:
Public class Coin
{
Private
Q35: Consider the following code snippet:
Public class Coin
{
Private
Q36: Which of the following is an accessor
Q37: Consider the following code snippet:
Public class Vehicle
{
)
Q38: Which of the following declares a rpmRating
Q40: Which of the following is a mutator
Q41: A constructor is invoked when _ to
Q42: Which statement calls a constructor with no
Q43: Consider the following code snippet:
Public class Coin
{
Private
Q44: If you do not provide a constructor
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