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
4. Identify and bound the SOI’s Operating Environment.
Can you explain singleton pattern?
What is use case in clean architecture?
What are the types of design patterns?
Hi, I have 9backlogs in btech and i am 2008 passed out,am working with an MNC from past 3 years.now, am willing to do MS, will it be any problem for me?
Can we have this pattern implemented using static class?
What is the behavioral design pattern?
What is synchronizer token pattern?
Can we use an equated value as operands for an MVC ? Reason for the same.
What are the most important software design patterns?
What is the difference between factory and builder design pattern?
What is viper architecture?
What are the additional productivity features and enhancements included with Quartus II software version 6.0?
What is the difference between factory and strategy design pattern?
Describe the builder design pattern