Skip to content

Latest commit

 

History

History
3 lines (2 loc) · 281 Bytes

README.md

File metadata and controls

3 lines (2 loc) · 281 Bytes

Factory

The factory design pattern is used when we have a superclass with multiple sub-classes and based on input, we need to return one of the sub-class. This pattern takes out the responsibility of the instantiation of a class from the client program to the factory class.