intermediateOOP Fundamentals for LLD

What is the difference between aggregation and composition?

Tests whether you know composition implies ownership and lifecycle dependency, while aggregation is a looser has-a relationship.

This is a Pro question

Sign in, then upgrade to Pro or Power to unlock this question and the full Interview Prep bank.

What is the difference between aggregation and composition?

Next Step

Continue to What is the Law of Demeter (Principle of Least Knowledge)?← Back to all Design Patterns & LLD questions