Creational Patterns
GUIFactory
) with methods to create various related products (e.g.
createButton()
, createCheckbox()
). Concrete factories (WindowsFactory
, MacFactory
) implement these methods to produce
OS-specific components. Client code uses the abstract factory interface to create components, so it stays agnostic of
concrete classes. This ensures products from the same family are used together.