The Liskov Substitution Principle
- Subtypes must be substitutable for their base types.
- Closely related to Design by Contract.
- Substituting subtypes should not cause different or unexpected behaviour.
- Google: Liskov Substitution Square Rectangle
Objects do not create other objects on which they rely to do their work. Instead they get their dependencies from an outside source.
See also: “What is S.O.L.I.D?”