设计目标---->

1.开闭原则(The Open-Closed Principle ,OCP)

2.里氏替换原则(Liskov Substitution Principle ,LSP)

3.迪米特原则(最少知道原则)(Law of Demeter ,LoD)

设计方法------>

4.单一职责原则(SRP:Single responsibility principle)

5.接口分离原则(Interface Segregation Principle ,ISP)

6.依赖倒置原则(Dependency Inversion Principle ,DIP)

7.组合/聚合复用原则(Composite/Aggregate Reuse Principle ,CARP)

详情参考:

https://blog.csdn.net/qq_34760445/article/details/82931002

02-26 12:29