2019-06-24
定义 Define an interface for creating an object,but let subclasses decide which class to instantiate.Factory Method lets ...
定义 Define an interface for creating an object,but let subclasses decide which class to instantiate.Factory Method lets ...
Ensure a class has only one instance, and provide a global point of access to it.(确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例。) 类...
运用设计模式,需要记住六大设计原则: Single Responsibility Principle:单一职责原则 Open Closed Principle:开闭原则 Liskov Substitution Principle:里氏替换...