Getter and Setter Methods

Back to Encapsulation

Methods that provide controlled read/write access to private fields. Allow adding validation, computation, or side effects when accessing state. Overuse can indicate poor encapsulation if they simply expose raw data.

property encapsulation accessors