Domanda di colloquio di Comcast

Why use Factory instead of direct object creation?

Risposta di colloquio

Anonimo

16 gen 2026

The Factory Pattern hides object creation logic and returns objects based on input. Benefits: 1. Loose coupling 2. Easy to extend 3. Follows Open/Closed Principle