Which pattern help to define the kind of objects to be created?

Abstract Factory

Builder

Factory Method

Prototype

Correct Option - d

Option 3: Factory Method

The Factory Method pattern is specifically designed to define an interface for creating objects but lets subclasses or derived classes determine the type of objects to be created. It provides a way to delegate the responsibility of instantiating objects to its subclasses, allowing for flexibility in the creation process.

Abstract Factory (Option 1) is more about providing an interface for creating families of related or dependent objects.

Builder (Option 2) is used to construct a complex object step by step. It separates the construction of a complex object from its representation.

Prototype (Option 4) is about creating new objects by copying an existing object, which is often used when the cost of creating an object is more expensive or complex than copying an existing one.

To get all Infosys Certified Associate Architect Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in