DSA Factory
Free Low-level design lessonsLow-level design · Stage 0 · The approach · Step 2

Relationships and diagrams

Association, aggregation, composition, inheritance and dependency, how to draw them, and how a sequence diagram shows a flow. About 13 minutes.

Quick check

Which test best distinguishes composition from aggregation?

  1. ACan the part exist without the whole? If not, it is composition
  2. BIs there more than one part?
  3. CIs the field public?
Show the answer

Can the part exist without the whole? If not, it is composition. Lifetime ownership is the difference.

Lock it in

4 questions on this idea

Short questions that apply the idea to new cases: trace it, work out a number, put steps in order. A wrong answer explains itself.

Answer them in your browserFree account, no card. Your progress is saved, and the idea comes back in a quick review later.
Sign up free to solve