Upload
paulo-monteiro
View
65
Download
0
Embed Size (px)
Citation preview
S.O.L.I.D
Principles
By PaulBBy Paulo Monteiroyo Monteiro
Liskov Substitution Principle :
The Liskov Substitution Principle says that the object of a derived class should be able to
replace an object of the base class WITHOUT bringing any ERRORS in the system or
modifying the behavior of the base class.
Ugly duck can eat ?
This is the Ugly Duck ...
Ugly duck can eat ?
Ugly duck can fly ?
Ugly duck can eat ?
Ugly duck can fly ?
Ugly duck can quack?
Is a
??????
Remembering the Liskov Substitution Principle is easy:
ask if an “object” can be substituted for another “object” before inheriting.