2-SOLID Principles2
2-SOLID Principles2
By / Samah Ezz
A class should be open for extension but closed for
2. Open/Closed modification.
• A class shouldn't be
forced to implement
methods it doesn’t
use.
• Bad Example
(Violating ISP)
A single interface
forces all classes to
implement
unnecessary methods.
• Good Example (Following
ISP)
We split the interfaces into
smaller, specific ones.