Unlimited Plugins, WordPress themes, videos & courses! Unlimited asset downloads! From $16.50/m
by
Lessons:13Length:2.5 hours
Crs 85492
  • Overview
  • Transcript

3.3 Liskov Substitution

Still on the topic of inheritance, it’s important to deal with it with care. If you’ve decided to use it seriously, you need to make sure all child subtypes respect the parent’s initial purpose.

In this lesson you learn how to keep the parent’s contract in such a way that when replacing it with a subtype you won’t cause trouble.