Each outcome is backed by the checks that test it. Solid means every check was right first time; with hints means you got there with a nudge; worth a revisit means an answer was revealed or is still wrong.
1
Say what goes wrong when any code can change an object's fields, and what encapsulation means: only the object's own methods change its data.
Not yet
2
Make a field private in Java or mark it with an underscore in Python, and say what each language does when outside code touches it.
Not yet
3
Let outside code read a private field through a getter or a Python property, with no setter, and return a copy of a list instead of the list itself.
Not yet
4
Write a class whose data can only change through methods that check every change, so that it keeps its invariant after every call.
Not yet
Your cheat sheet
What each lesson leaves you able to do, in one place. Lessons you have not finished are dimmed, not hidden.
Write a getter that returns a private field and changes nothing, such as getBalance in Java.
Write a Python property with @property, which outside code reads like a field, and say what happens when outside code tries to set one that has no setter.
Leave out the setter for a value that must follow a rule, and change it through methods named for the action, such as deposit and withdraw.
Return a copy of a list field, because returning the list itself lets outside code change the object's data.
Say what an invariant is: a rule about an object's data that holds after the constructor and after every method call.
Find every door through which the data can change, the constructor included, and put a check at each one.
Write each changing method as check first, change second, so that a refused call leaves the object exactly as it was.
Say why a method refuses with an error (ValueError in Python, IllegalArgumentException in Java) rather than a returned false: a caller cannot ignore it by accident.