Description
Provides an interface for creating families of related or dependent objects without specifying their concrete classes.
Where to use
- Cross-platform UI toolkits. \n
- Theming systems.
Real World Example
A UI Factory creates Buttons and Checkboxes. The 'MacFactory' creates MacButton and MacCheckbox. The 'WinFactory' creates WinButton and WinCheckbox.
Code Example
class AbstractFactory:
def __init__(self):
pass
def execute(self):
print('Executing Abstract Factory')
