需求
“Create an abstract factory UML class diagram for an application that uses light and dark GUI factories to create buttons and checkboxes.”
接著試試Add a createMenu method to GUIFactory.Add light and dark menu classes.
這張圖裡有什麼
看懂背後的決策。
01
Use interface-based factories
02
Separate product families into hierarchies
When a system must be independent of how its products are created and families of products are used together.