Intermediate Object-Oriented Programming Concepts
Q72 / 100

What is a "factory" in the context of object creation patterns?

Correct! Well done.

Incorrect.

The correct answer is B) An object or method whose responsibility is to create other objects, often hiding the instantiation logic

B

Correct Answer

An object or method whose responsibility is to create other objects, often hiding the instantiation logic

Explanation

Factories centralize and encapsulate object creation logic, useful when creation involves complex setup or choosing between several related classes.

Progress
72/100