SOFTWARE DESIGN
DESIGN PATTERNS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Encapsulates interchangeable behaviours and uses delegation to decide which one to use.
|
|
Separates the construction of a complex object from its representation.
|
|
Subclasses decide which concrete classes to create.
|
|
Changes the interface of one or more classes.
|
|
Simplifies the interface of a group of classes.
|
Detailed explanation-1: -In class-based programming, the factory method pattern is a creational pattern that uses factory methods to deal with the problem of creating objects without having to specify the exact class of the object that will be created.
Detailed explanation-2: -Q 7-Which of the following is correct about Factory design pattern. A-This type of design pattern comes under creational pattern. B-Factory pattern creates object without exposing the creation logic to the client. C-Factory pattern refers to newly created object using a common interface.
Detailed explanation-3: -Factory Method is a creational design pattern that provides an interface for creating objects in a superclass, but allows subclasses to alter the type of objects that will be created.