Single Responsibility Principle 类的设计趋向于:Use Case Diagram --> (derived) --> Detail Open-Closed Principle /* Software entities should be open for extension, but closed for modification */ 反面例子:Dependency: 作为参数,作为局部变量,调用静态方法. 改进方式:增加抽象类或者接口,以及set方法. Li
From Head First Design Patterns. Design Principle: Idnetify the aspects of your application that vary and separate them from what stays the same. Here's another way to think about it: Take the parts that vary and encapsulate them, so that later you c
Part 1 http://techmytalk.com/2014/01/24/java-interview-reference-guide-part-1/ Posted on January 24, 2014 by Nitin Kumar JAVA Object Oriented Concepts Java in based on Object Oriented concepts, which permits higher level of abstraction to solve any p
以下是list数据类型的各种操作 list.append(x) 给list末尾添加一个元素 Add an item to the end of the list; equivalent to a[len(a):] = [x]. list.extend(L) 添加一组数据到list 的末尾 Extend the list by appending all the items in the given list; equivalent to a[len(a):] = L. list.in
The Open – Closed principle have been formed by Bertrand Meyer in 1988, it can be paraphrased as: Software entities (let it be classes, modules, functions, etc.) should be open for extending and closed for modification. This simple rule means that w