Problem Statement
Describe a use-case where encapsulation improves reliability and maintainability of code.
Explanation
Consider a `BankAccount` class that keeps `balance` private and provides `deposit()` and `withdraw()` methods with internal checks (such as non-negative amounts and sufficient funds). This design hides the actual data, prevents external direct modification, enforces rules, and centralises validation logic. This encapsulation simplifies maintenance because changes to validation or logging only happen inside the class, not across the system.