Module 08 · System Design · Low-level design: classes, properly
Five letters, one shop (SOLID)
Five Letters, One Shop · Open board
One till, broken five ways, one SOLID rule per break, and the fake card that proves the last one.
Before you start. Four words from earlier in the track come back here. A class is a blueprint for objects. A method is an action an object can do. An interface is the small set of actions a class shows to callers. To inherit is to be declared a kind of a parent class and get all its methods. Holding a part (composition) is keeping another object inside and passing requests to it. The object that keeps its own rules (encapsulation and invariants) showed a class guarding its own rules behind a small front. Has-a beats is-a (composition over inheritance) showed the choice between holding a part and inheriting, and the warning that a child must keep every promise its parent made. You also need to read a little Python.
Lesson 38 of 73 in System Design
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year, or $19.50 for your first year with LAUNCH50, ends 1 Nov, 18:30 UTC.