Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

When to Use a Factory Pattern?

Answer Posted / guest

A class can?t anticipate which kind of class of objects it
must create.
A class uses its subclasses to specify which objects it creates.
You want to localize the knowledge of which class gets created.


There are several similar variations on the factory pattern
to recognize.
1. The base class is abstract and the pattern must return a
complete working class.
2. The base class contains default methods and is only
subclassed for cases where the default methods are insufficient.
3. Parameters are passed to the factory telling it which of
several class types to return. In this case the classes may
share the same method names but may do something quite
different.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of the proxy design you will get in the design pattern?

1021


What are the benefits of the proxy in the design pattern?

1139


What are the disadvantages of singleton pattern?

1191


What are the examples of the behavioral design patterns?

1196


What is mvp design pattern?

1209


What is singleton design pattern in java?

1224


What are the most commonly used design patterns?

1124


5.Develop an entity relationships diagram that identifies physical entity relationships.

2884


What are the additional productivity features and enhancements included with Quartus II software version 6.0?

2438


What is the difference between proxy and adapter?

1200


What is the creational design pattern?

1149


What is use case in clean architecture?

1153


What is the design pattern?

1144


What are the most popular design patterns?

1115


What is the factory pattern in the design pattern?

1222