Skip to content

Commit 2fc92ff

Browse files
authored
Merge pull request #33 from wenpingwu001/patch-1
fix typo LSP to ISP
2 parents 310bb52 + 97c5a6c commit 2fc92ff

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/design-patterns/design-principles-and-ideas.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ class Dishwasher {
6161

6262
这样,`Chef` 类专注于烹饪,而 `Dishwasher` 类专注于洗碗。每个类都有一个单一的职责,使得代码更清晰、易于理解,并且在未来的变更中更具弹性。
6363

64+
### ISP 接口隔离原则
65+
6466
### 开放封闭原则
6567

6668
开关封闭原则(Open/Closed Principle,OCP)要求软件实体(例如类、模块、函数等)应该对扩展开放,对修改关闭。简而言之,一个模块在扩展新功能时不应该修改原有的代码,而是通过添加新的代码来实现扩展。

0 commit comments

Comments
 (0)