diff --git a/Basic/Solid/ShapeInterface.php b/Basic/Solid/ShapeInterface.php index aae0f75..063ac22 100644 --- a/Basic/Solid/ShapeInterface.php +++ b/Basic/Solid/ShapeInterface.php @@ -2,4 +2,5 @@ interface ShapeInterface { public function area(); + public function volume(); } \ No newline at end of file diff --git a/Basic/Solid/doc.md b/Basic/Solid/doc.md index 002bd2e..9f70d7d 100644 --- a/Basic/Solid/doc.md +++ b/Basic/Solid/doc.md @@ -10,4 +10,8 @@ Let q(x) be a property provable about objects of x of type T. Then q(y) should b q(x) x of type T q(y) y of type S (subtype of T) -This means that every subclass or derived class should be substitutable for their base or parent class. \ No newline at end of file +This means that every subclass or derived class should be substitutable for their base or parent class. + +# Interface Segregation Principle +A client should never be forced to implement an interface that it doesn’t use, or clients shouldn’t be forced to depend on methods they do not use. +