When should attributes of an object be public?

When should attributes of an object be public?

When should attributes of an object be public?

A.
Rarely, since it breaks encapsulation.

B.
In those cases when performance needs to be enhanced.

C.
As a normal course of action, so that client objects require less code and can more easily get at
other objects’ state data.

D.
When the implementation language supports multiple levels of object visibility.



Leave a Reply 0

Your email address will not be published. Required fields are marked *