Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote