When an array is passed as a (normal) parameter to a method, modifying the eleme
ID: 3531643 • Letter: W
Question
When an array is passed as a (normal) parameter to a method, modifying the elements of the array from inside the method will result in a change to those array elements as seen from the client, after the method call is complete.
true or false??
When an object is passed as a normal (i.e. non-reference or pointer) parameter to a method, modifying the members of that object from inside the method will result in a change to that object as seen from the client, after the method call is complete.
true or false??
Which are true about instance variables of a class (check all that apply):
B. Member instance methods of the same class must use this-> before their names in order to access them.
C. Loop counters and other helper variables should be declared as instance variables so that such counters and helpers don't have to be re-declared local to every member method, individually.
D. Member instance methods of the same class must use mutator methods to modify their values.
E. Mutators should protect them by filtering bad parameter values before assigning those values to them.
Which are true about instance variables of a class (check all that apply):
A. They should usually be declared private.
B. Member instance methods of the same class must use this-> before their names in order to access them.
C. Loop counters and other helper variables should be declared as instance variables so that such counters and helpers don't have to be re-declared local to every member method, individually.
D. Member instance methods of the same class must use mutator methods to modify their values.
E. Mutators should protect them by filtering bad parameter values before assigning those values to them.
Explanation / Answer
true
false
D. Member instance methods of the same class must use mutator methods to modify their values. ? Only if they are private and not friends
E. Mutators should protect them by filtering bad parameter values before assigning those values to them.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.