Skip to content

Commit 3028d66

Browse files
authored
Update README.md
1 parent 437d11f commit 3028d66

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

4 - Interface Segregation Principle/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
# Interface Segregation Principle (ISP)
22

3-
The Interface Segregation Principle (ISP) is a design principle from the SOLID principles that suggests that a class should not be forced to implement interfaces that it does not use. In other words, a class should only depend on the interfaces that it actually needs, rather than being forced to depend on large, monolithic interfaces that contain many methods or properties.
3+
The Interface Segregation Principle (ISP) suggests that a class should not be forced to implement interfaces that it does not use. A class should only depend on the interfaces that it actually needs, rather than being forced to depend on large, monolithic interfaces that contain many methods or properties.
44

5-
The ISP is important because it promotes modularity and separation of concerns, which leads to code that is easier to understand, modify, and maintain. By ensuring that classes only depend on the interfaces that they actually need, you can reduce coupling between different parts of the codebase, which makes the codebase more robust, reliable, and scalable.
5+
This principle promotes modularity and separation of concerns By ensuring that classes only depend on the interfaces that they actually need, you can reduce coupling between different parts of the codebase. You must consider the requirements of each class or module in the system, and this may involve breaking up an interface into smaller, more focused interfaces that are specific to the needs of each class.
66

7-
To follow the ISP, it's important to carefully consider the requirements of each class or module in the system, and ensure that each class only depends on the interfaces that it actually needs. This may involve breaking up large, monolithic interfaces into smaller, more focused interfaces that are specific to the needs of each class.
8-
9-
In practice, this means that you should design your interfaces to be as small and focused as possible, with a clear separation of concerns. This allows you to minimize the amount of code that needs to be changed when making modifications to the system, and makes it easier to add new functionality or refactor existing code.
7+
In practice, this means that you should design your interfaces to be as small and focused as possible. This allows you to minimize the amount of code that needs to be changed when making modifications to the system, and makes it easier to add new functionality or refactor existing code.
108

119
### Class diagram for the current example
1210

0 commit comments

Comments
 (0)