Home [閱讀筆記][Design Pattern] Ch3. 單一職責原則(Single Responsibility Principle)
Post
Cancel

[閱讀筆記][Design Pattern] Ch3. 單一職責原則(Single Responsibility Principle)

單一職責原則

就一個類別而言,應該僅有一個引起它變化的原因。

定義:Each class in your system should have only one responsibility.

This post is licensed under CC BY 4.0 by the author.

[閱讀筆記][Design Pattern] Ch2. 商場促銷-策略模式(Strategy)

[閱讀筆記][Design Pattern] Ch4. 開放封閉原則 Open-Closed Principle (OCP)