Skip to content

Glossary: Software Design Patterns in Java

Liskov substitution principle (LSP)

Also written: LSP, Liskov substitution

The SOLID rule that a child class must work anywhere its parent works. `LockedCard` breaks it by throwing in `topUp`.

Where the book teaches it

Related terms

SOLIDHas-a / is-a