Why this matters
Getters and setters are public fields wearing a disguise. When the caller reads the balance, adds to it, and writes it back, the business rule (the deposit amount must be positive, the balance must never go negative) is scattered across every call site. When the object owns that rule entirely — via a deposit() method — you can never break it from outside. This is the core of the "Tell, Don't Ask" principle.
Code Challenge
Study the messy code, try to refactor it, then reveal the clean version.
Key takeaway
Replace getters and setters with methods that describe intent — deposit(), withdraw(), promote(). Business rules live inside the object and can never be bypassed from outside.