Question d’entretien chez Finmatics GmbH

Explain factory pattern. When and why do we need it?