Design with structure diagrams
Represent a solution as a hierarchy of tasks and subtasks before writing detailed steps.
This sequence follows Cambridge IGCSE Computer Science 0478, 2026–2028 syllabus Version 6. It covers subject content Topic 7 only. The separately published 2029–2031 syllabus is not mapped here. Practice is original, self-checked and does not award an official Cambridge grade. Full timed papers and human subject-teacher review remain outstanding.
Before you begin
- No programming language is required. Be comfortable with place value and multiplication; each lesson introduces the computer-science notation it uses.
Work on paper. Try each question before revealing help, and explain why your method works.
Quick readiness check
Which is a suitable child task under “process order”?
What you will learn
- Explain a structure diagram
- Decompose a task into ordered subproblems
- Check that the diagram covers the requirement
A structure diagram shows task breakdown
A structure diagram represents a system or algorithm as a hierarchy. The main task appears above the sub-tasks that contribute to it; related tasks can be grouped under a shared responsibility.
Apply and check the rule
Use it to plan decomposition, not to show every instruction or decision. Check that the lower-level tasks collectively cover the requirement and that the connections between them make sense.
Pause and explain
Does a structure diagram normally show every decision arrow in execution order?
Worked example
Create a high-level structure for calculating and reporting a class average.
Show the worked solution
- Start with the main task: report class average.
- Break it into collect marks, calculate average and show result.
- Break calculation into total marks and number of students.
Answer Report class average → collect marks; calculate average (total marks, count students); display result.
Try a topic test
Choose Easy, Normal or Difficult. Save your answers and open worked review after finishing.
Test this topic →From guided practice to a new situation
Write your answer and reasoning first. Use a hint only if you are stuck. The model solution is for self-checking; your written work is not automatically marked.
Break “manage a library loan” into three suitable subtasks.
Give me a hint
Separate checking, recording and communicating.
Compare my reasoning
- Check whether the member and book are eligible.
- Record the loan and due date.
- Display or send the loan confirmation.
Eligibility check; loan recording; confirmation.
Look for these in your work
- Three subtasks
- Responsibilities cover the main task
A structure diagram for a calculator has input and display tasks but no calculation task. Identify the gap.
Give me a hint
Compare the subtasks with the main purpose.
Compare my reasoning
- Inputs are collected.
- No subtask transforms them into the requested result.
- Add the required calculation before display.
The processing subtask is missing. Add the calculation between input and display.
Look for these in your work
- Missing step
- Reason
- Correction
A team has five similar data checks scattered across a design. Explain how a structure diagram can improve the plan without replacing detailed algorithm steps.
Give me a hint
Group repeated responsibility, then expand it later.
Compare my reasoning
- A shared validation subtask can group related checks.
- The top-level diagram shows where validation belongs.
- Detailed rules and branch order can then be specified in pseudocode or a flowchart.
Group the checks under a validation task in the hierarchy, then define each rule in the detailed design. The structure diagram organises responsibilities but does not replace the algorithm.
Look for these in your work
- Decomposition
- Placement
- Method boundary
Common mistakes
- Using a structure diagram as if it showed detailed branch order
- Leaving a required subtask out of the hierarchy
What can you explain now?
What does a structure diagram primarily show?
Compare with the explanation
A hierarchy of tasks and subtasks
It supports decomposition and planning.
After trying it yourself, choose your next review. This is your self-assessment.
Your review choice appears on Today. Sign in to sync it across devices.
Make it stick
When is a structure diagram useful, and what detail does it leave out?
If you needed the solution, close it and solve the problem again from a blank page. A correct answer is stronger when you can explain the reason for each step.