Liskov substitution: shipping products

A subtype must keep every promise of the type it stands in for, or not claim to be one.

Level Intermediate

What you will see

  1. Not every product ships
  2. An e-book that cannot ship
  3. Promise only what you keep
  4. Tests every subtype must pass
  5. When the principle bends

Before / after

Base: liskov-substitution-base-tsView the diff

Exercises