SOFTWARE ENGINEERING

SOFTWARE DESIGN

DESIGN PATTERNS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Prototype is a creational design pattern that lets you copy existing objects without making your code dependent on their classes.
A
true
B
false
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -Prototype pattern refers to creating duplicate object while keeping performance in mind. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object.

Detailed explanation-2: -Prototype design pattern is used when the Object creation is a costly affair and requires a lot of time and resources and you have a similar object already existing. Prototype pattern provides a mechanism to copy the original object to a new object and then modify it according to our needs.

Detailed explanation-3: -what is Prototype design pattern ?! cloning of an existing object instead of creating new one and can also be customized as per the requirement. Prototype design pattern is used in scenarios where application needs to create a number of instances of a class, which has almost same state or differs very little.

There is 1 question to complete.