The behavior of an object is defined by the object’s a) instance data b) constructor c) visibility modifiers d) methods e) all of the above


The behavior of an object is defined by the object’s


a) instance data

b) constructor

c) visibility modifiers

d) methods

e) all of the above

Answer: d. Explanation: The methods dictate how the object reacts when it is passed messages. Each message is implemented as a method, and the method is the code that executes when the message is passed. The constructor is one of these methods but all of the methods combine dictate the behavior. The visibility modifiers do impact the object’s performance indirectly.