Introduction
Custom getters and setters let you control how a property value is read or changed. This helps keep data safe and correct.
When you want to check or change a value before saving it.
When you want to calculate a value on the fly instead of storing it.
When you want to log or track changes to a property.
When you want to hide how a value is stored from outside code.