I read a summary which always use the definition "principle of substitution" when it talk about inheritance. But It doesn't explain the meaning of this principle.
What is this principle?
Thank you.
It means plainly: a subclass must honor the contract set by the super class.
If you extend a super class, you should read its document and implement as it dictates. That's all.
If I hear one more time "Liskov substitution" I'm going to kill a kitten.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With