Cambridge O Level Computer Science · Syllabus 2210 · Algorithm Design and Problem-Solving
Structure Diagram
What is Structure Diagram?
A hierarchical design diagram that shows a system at the top and its sub-systems on the levels below, with each sub-system broken down further where necessary; it shows what the parts of a solution are and how they nest, not the order in which steps are carried out.
This definition is part of the Algorithm Design and Problem-Solving chapter in Cambridge O Level Computer Science.
Structure Diagram in context
Topic 7 is about the work that happens before and around writing code. You analyse a problem (identify it, strip away what does not matter, break it into parts, and name the inputs, processes, outputs and storage), you design a solution (structure diagram, flowchart, pseudocode), you code it, and you test it with data you chose on purpose. Along the way you use a small fixed set of standard methods — linear search, bubble sort, totalling, counting, maximum, minimum, average — you protect the input with validation and verification, and you prove behaviour with trace tables and with normal, abnormal, extreme and boundary test data. Nothing in this topic requires you to be fluent in a programming language; it requires you to be exact.
The three design notations are not three solutions to compare. They are three views of the same solution, each showing something the others hide. A structure diagram shows what the parts are; a flowchart shows the paths through them; pseudocode states each step exactly. In an exam you will normally be asked for one — but being able to move between them is what makes a flowchart question answerable when you thought in pseudocode, and the other way round.
Common mistakes with Structure Diagram
- M5. “A structure diagram is a kind of flowchart.” Correct A structure diagram shows hierarchy and containment. A flowchart shows control flow. Only the flowchart has arrowheads, decisions and terminators.
- M6. “An algorithm has to be written in a programming language.” Correct An algorithm is a finite, ordered, unambiguous sequence of steps. It can be a flowchart, pseudocode, a structure diagram or ordinary written steps.
Examiner tips on Structure Diagram
- Which one will the exam ask for? Read the command. “Draw a flowchart” means shapes and arrows. “Write an algorithm”, “write pseudocode” or “complete the pseudocode” means Cambridge pseudocode. “Complete the structure diagram” means fill in boxes in a hierarchy. Answering in the wrong notation is one of the few ways to write a completely correct solution and score zero.

