10 2020 档案

摘要:模板模式(Template Method Pattern) Define the skeleton of an algorithm in operations, deferring some steps to subclasses. Template Method lets subclasses r 阅读全文

posted @ 2020-10-20 07:45 codingEskimo 阅读(84) 评论(0) 推荐(0)

摘要:抽象工厂模式(Abstract Factory Pattern) Provide an interface for creating families of related or dependent objects without specifying their concerete classes 阅读全文

posted @ 2020-10-15 06:06 codingEskimo 阅读(91) 评论(0) 推荐(0)

摘要:工厂模式 Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation 阅读全文

posted @ 2020-10-14 11:53 codingEskimo 阅读(83) 评论(0) 推荐(0)

摘要:单例模式(Singleton Pattern) Ensure a class has only one instance, and provide a global point of access to it.(确保只有一个实例, 而且自行实例化并向整个系统提供这个实例。) 模板 通用代码 publ 阅读全文

posted @ 2020-10-12 05:34 codingEskimo 阅读(96) 评论(0) 推荐(0)

摘要:六大原则 单一职责原则: There should be no more than one reason for a class to change 最佳实践: 接口的设计一定要做到单一职责,类的设计尽量做到只有一个原因引起变化。 里氏替换原则: Functions that use pointer 阅读全文

posted @ 2020-10-11 07:47 codingEskimo 阅读(113) 评论(0) 推荐(0)

导航