Factory Method Design Pattern

From JholJhapata
Revision as of 13:36, 8 December 2019 by Admin (talk | contribs)

Factory Pattern or Factory Method Pattern is a creational design pattern that provides an interface or abstract class for creating objects in a superclass, but allows subclasses to alter the type of objects that will be created. In other words, subclasses are responsible to create the instance of the class.

Problem

Solution

Structure

Example