Which are true about instance variables of a class (check allthat apply): A. The
ID: 3609816 • Letter: W
Question
Which are true about instance variables of a class (check allthat apply):
A.
They should usually be declaredprivate.
B.
Mutators should protect them byfiltering bad parameter values before assigning those values tothem.
C.
Loop counters and other helpervariables should be declared as instance variables so that suchcounters and helpers don't have to be re-declared local to everymember method, individually.
D.
Member instance methods of the sameclass must use mutator methods to modify their values.
A.
They should usually be declaredprivate.
B.
Mutators should protect them byfiltering bad parameter values before assigning those values tothem.
C.
Loop counters and other helpervariables should be declared as instance variables so that suchcounters and helpers don't have to be re-declared local to everymember method, individually.
D.
Member instance methods of the sameclass must use mutator methods to modify their values.
Explanation / Answer
Which are true about instance variables of a class (check allthat apply):
A.
They should usuallybe declared private.
B.
Mutators shouldprotect them by filtering bad parameter values before assigningthose values to them.
C.
Loop counters and other helpervariables should be declared as instance variables so that suchcounters and helpers don't have to be re-declared local to everymember method, individually.
D.
Member instancemethods of the same class must use mutator methods to modify theirvalues.
A.
They should usuallybe declared private.
B.
Mutators shouldprotect them by filtering bad parameter values before assigningthose values to them.
C.
Loop counters and other helpervariables should be declared as instance variables so that suchcounters and helpers don't have to be re-declared local to everymember method, individually.
D.
Member instancemethods of the same class must use mutator methods to modify theirvalues.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.