Design the Factory pattern and What is its application ?

Answer Posted / fact pandit

I think the question is on Factory Method Pattern. So I
will go in that direction. However there is another pattern
called the Abstract Factory Pattern which is realted to
Factory Method Pattern.

If we have to hide the "Creation" of an object and its
Concrete type to a client, then the tendency is to
use "Factory Method Pattern".

Normally a factory method is a method that is part of
an "Abstract Factory". Client calls the factory method on
an abstract factory which is a concrete object of an
interface whose type may or may not be known to the client,
to get a concrete object of the interface for product whose
concrete type may or may not be useful to the client.

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you explain singleton pattern?

562


What is the executor design pattern?

718


What is the creational design pattern?

623


What are the examples of the behavioral design patterns?

595


What is the concurrency design pattern?

700






Which design pattern is mostly used in net?

574


What is singleton and factory pattern?

573


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

589


When singleton pattern is used?

595


What are the design patterns you know explain?

582


What are the differences between the design patterns and the framework?

595


Can we inherit singleton class?

599


How did you design your unit tests?What about integration tests?

1794


What are the most commonly used design patterns?

592


What is the gang of four design pattern?

601