-
Single Responsibility Principle
Definition: As far as a class is concerned, there should be only one reason for it to change.
-
open closed principle
Definition: Classes, modules, functions, etc. should be extensible, but not modifiable. Two meanings: one is open for extension, and the other is closed for modification.
-
Liskov Substitution Principle
Definition: All places that refer to the base class (parent class) must be able to use objects of its subclasses transparently.
-
Dependency Inversion Principle
Definition: High-level modules should not depend on low-level modules, both should depend on abstractions. Abstractions should not depend on details, details should depend on abstractions.
-
Demeter principle
Definition: A software entity should interact with other entities as little as possible.
-
Interface Segregation Principle
Definition: A class's dependence on another class should be based on the smallest interface.
Six Design Principles of Interview Questions
おすすめ
転載: blog.csdn.net/fry3309/article/details/125279713
ランキング