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
Split a class that changes for several reasons into classes with one job each, and say which class a given request edits.
Not yet
2
Add a new kind of rule as a new class behind an interface, so the code that uses the rules is not edited.
Not yet
3
Spot a child class that breaks a promise its parent makes, and rebuild the family so that code written for the parent stays correct.
Not yet
4
Split an interface that forces classes to fill methods with errors, and hand a class the object it depends on instead of creating it inside.
Not yet
5
Name the principle a small design breaks, and say how to fix it.
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.
Say the dependency inversion principle: the class that makes decisions and the class that does low-level work both depend on an interface between them.
Spot the sign: a class that creates its own file, database or sender inside its constructor.
Hand the object in through the constructor (dependency injection), and keep the field's type as the interface.
Use an in-memory storage to check what a service saved, without a file and without editing the service.
Name the principle each of five small programs breaks: one class with three jobs, an if per kind, a child that refuses its parent's method, an interface too big for a lamp, and a sender created inside.
Say the fix for each, in a sentence.
Tell the Liskov rule from interface segregation: a child breaking a parent's promise, against an interface asking for more than a class can do.