Difference between revisions of "Factory Method Design Pattern"

From JholJhapata
(Created page with "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 subclass...")
 
Line 1: Line 1:
 
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.
 
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 ==

Revision as of 13:36, 8 December 2019

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