Single responsibility: The computer has just been repaired. Obviously, the memory is broken and should not be the reason for CPU replacement. Their Respective responsibilities are clear;
Open-closed Principle: The memory is not enough, as long as the slot is enough to be added, the hard disk is not enough to use mobile hard disks, etc. The PC interface is limited, so the expansion is limited, and the software system is well designed, but it can be expanded infinitely.
Dependency reversal Principle
Abstraction should not depend on details. Details should depend on abstraction (for interface programming, not for implementation programming) for abstract programming rather than for detail Programming
Dependency reversal Principle
A. High-level modules should not depend on low-level modules. Both of them should depend on abstraction.
B. abstraction should not depend on details. Details should depend on abstraction.
LSP: child types must be able to replace their parent types (for example, when learning the concept of inheritance, child classes inherit the parent class, and child classes can appear as parent classes. Is-a principle)
If a software object uses a parent class, it must be applicable to its subclass and cannot detect the difference between the parent class object and the subclass object. That is to say, in the software, replace the parent class with its Child class, and the behavior of the program remains unchanged.
Dependency inversion can be said to be a sign of object-oriented design. It is not important to write a program in which language. If the programming is based on abstract programming rather than detailed programming, that is, all dependencies in the program end with abstract classes or excuses, that is, object-oriented design, and vice versa, that is, procedural design.