Question OOP-ENC-0017
HardA class returns its private internal list directly from a getter. What is the risk?
- A.
No risk at all
- B.
Callers can modify the list and break the class's invariants
- C.
Sign up free to see the answer and a step-by-step explanation.