一分鐘會議(Test)
- 23. 如何消滅重複的程式碼
•
提練方法 Extract Method (110) (*)
•
替換演算法 Substitute Algorithm (139) (**)
•
程式上移 Pull Up Method (332) (**)
•
塑造模板函式 Form Template Method (345) (***)
•
...
•
…balabalabala
- 24. 如何消滅重複的程式碼
•
提練方法 Extract Method (110) (*)
•
替換演算法 Substitute Algorithm (139) (**)
•
程式上移 Pull Up Method (332) (**)
•
塑造模板函式 Form Template Method (345) (***)
•
…
•
…balabalabala
- 27. 如何消滅重複的程式碼
•
提練方法 Extract Method (110) (*)
•
替換演算法 Substitute Algorithm (139) (**)
•
程式上移 Pull Up Method (332) (**)
•
塑造模板函式 Form Template Method (345) (***)
•
...
•
…balabalabala
- 30. 如何消滅重複的程式碼
•
提練方法 Extract Method (110) (*)
•
替換演算法 Substitute Algorithm (139) (**)
•
程式上移 Pull Up Method (332) (**)
•
塑造模板函式 Form Template Method (345) (***)
•
…
•
…balabalabala
- 32. 程式上移 (**)
Pull Up Method
•
避免「行為重複」,防止修了一個確未能修了另外
一個。
•
小心使用,因為修改 super class 會影嚮所有的
subclass 。
•
它有其它的合體技, ex.Substitute
Algorithm 、 Pull Up Field…balabala
- 33. 如何消滅重複的程式碼
•
提練方法 Extract Method (110) (*)
•
替換演算法 Substitute Algorithm (139) (**)
•
程式上移 Pull Up Method (332) (**)
•
塑造模板函式 Form Template Method (345) (***)
•
…
•
…balabalabala