Skip to content

TheRJHub/FactoryDesignPattern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Factory Method Design Pattern

--> The Factory Method pattern is used to create objects without specifying the exact class.

--> The class that needs an object asks a factory method to give it one.

--> The factory method decides which class to instantiate.

--> Useful when we have different types of objects but want to treat them the same way through a common interface.

Why we use it:

--> Avoids direct dependency on concrete classes.

--> Makes adding new types easier.

--> Centralizes object creation in one place.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages