📞 0339-0387701 (WhatsApp) Contact

« Back to Software Engineering (NCCIA)

Encapsulation helps maintenance because:

A. Testing is unnecessary
B. Code can never change
C. All data is public
D. Internal representation can change without affecting users of the class ✅

Correct Answer: D. Internal representation can change without affecting users of the class

Explanation

  • Callers depend on the interface, not the representation
  • Changing a list to a set inside a class need not break callers.