1 article
The factory pattern decouples object creation from consumers using a factory method interface — adding new types requires only a new class, not edits to existing switch statements.