Computer Science I / Structured Program Design
Practice question · Put in order

Order the steps of top-down decomposition as the lesson describes it.

Hints
  1. Top-down means starting at the largest scale and working downwards.
  2. Refinement can only be applied to pieces that already exist and are already named.
Show the answer
  1. State the whole task in one sentence
  2. Break the task into a few major sub-tasks
  3. Give each sub-task a clear name and a defined job
  4. Refine any sub-task that is still too complicated into smaller ones
  5. Stop when every remaining piece is simple enough to write directly
Why

Decomposition starts from the whole and repeatedly splits, naming each piece as it goes, until nothing left is complicated. Starting from small pieces and gluing them together is bottom-up, which is a different discipline; the top-down order is what keeps each level a complete description of the level above.

Read the lesson: Structured Program Design →

Practise Structured Program Design

The app has 7 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Structured Program Design