- Understand what structure diagrams and flowcharts are, and why they are used in software design
- Identify and use the correct symbols for both design notations
- Read and interpret existing structure diagrams and flowcharts
- Create your own structure diagrams and flowcharts to represent simple programs
- I can name and draw all four structure diagram symbols: process, loop, selection, predefined process
- I can name and draw all seven flowchart symbols: terminal, initialisation, input/output, decision, process, predefined process, on-page connector
- I can read a structure diagram or flowchart and trace through the order of execution
- I can identify where loops and selections appear in a diagram
- I can create a structure diagram or flowchart for a simple program from a description
Answer before the lesson begins. These check prior knowledge — it's fine if you're unsure.
1. In the analysis phase, what term describes a numbered list of what a program must do?
2. Which column of the IPO model would "calculate the total price" appear in?
3. At which stage of the development cycle does design take place?
Key vocabulary
Design: Structure Diagrams & Flowcharts
Why design before coding?
When developers receive a problem to solve, they do not jump straight into writing code. Instead, they produce a design — a plan for how the program will work before a single line of code is written. This saves time because errors in logic are much cheaper to fix on paper than in code that has already been built.
The SQA specification requires you to be able to read, understand, and create two graphical design notations: structure diagrams and flowcharts. Both represent the same program logic — they are just different ways of drawing it. You need to know both, and you need to be able to choose one and use it correctly.
Design happens after analysis (where you identify what the program must do) and before implementation (where you write the code).
Structure diagrams
A structure diagram breaks a problem into steps and sub-steps, arranged as a tree read from top to bottom, left to right. Each main step can be broken down (refined) into smaller sub-steps below it.
The four symbols used in structure diagrams are:
- Process — a plain rectangle; represents a single action or calculation.
- Loop — a stadium shape (rectangle with fully rounded ends); represents a section that repeats.
- Selection — a hexagon; represents a decision point where different branches are taken.
- Predefined process — a rectangle with a vertical line near each end; represents a call to a sub-program defined elsewhere.
A step or process in the program, such as a calculation.
A section that repeats — a fixed number of times or while a condition is met.
A decision point — the program branches depending on a condition.
A call to a function or procedure defined separately.
Reading order: Always follow each branch from top to bottom before moving to the next branch from left to right. The root node at the top is the overall problem.
Flowcharts
A flowchart uses standard shapes connected by arrows to show the exact order instructions execute. Unlike a structure diagram, a flowchart shows flow explicitly through arrows — including loops, which are formed by arrows pointing back up the diagram.
The seven symbols used in flowcharts are:
- Flow line — an arrow connecting symbols to show the direction of execution.
- Terminal — an oval; marks the START or END of the program.
- Initialisation — a hexagon; sets up a variable with a starting value before the main logic runs.
- Input/Output — a parallelogram; receives data from the user or displays data to the screen.
- Decision — a diamond; evaluates a condition; has exactly two exits labelled Yes/No or True/False.
- Process — a rectangle; performs a calculation or action.
- Predefined process — a rectangle with vertical lines at each end; calls a sub-program defined elsewhere.
- On-page connector — a small circle; used to continue a flowchart on the same page without crossing flow lines.
Shows the direction of flow between symbols.
Marks the START and END of the program.
Declares a variable or sets its initial value.
Data entered by the user (input) or displayed to the user (output).
A condition that causes branching. Two exits: True and False.
A step that performs a task, such as a calculation.
A call to a function or procedure defined elsewhere.
Splits a flowchart across columns to keep it on one page.
Key point: There is no loop symbol in a flowchart. Loops are shown by drawing an arrow that points back to an earlier symbol, creating a circuit.
Comparing the two notations
Both notations show the same program logic. Understanding the key differences helps you choose the right one and answer exam questions correctly.
- Structure diagrams show top-down decomposition — how a big problem is broken into sub-problems.
- Flowcharts show flow of control — exactly which instruction runs next, using arrows.
- Flowcharts have more symbols (especially the terminal and initialisation).
- Flowcharts show loops through back-arrows; structure diagrams use the loop shape.
- Both are valid at N5; exam questions may ask you to work with either one.
| Notation | Advantage | Disadvantage |
|---|---|---|
| Structure diagram | Clearly shows how a problem is broken into sub-steps | Can be hard to follow the exact flow of execution |
| Flowchart | Shows the flow of the program clearly | Can become long and complex for larger programs |
How loops and selections appear
Loop in a structure diagram: The stadium shape appears as a parent node. Its children hang below it and are the steps that repeat.
Loop in a flowchart: A decision diamond evaluates a condition. When true, arrows lead back up the diagram to repeat earlier steps. When false, the arrow exits downward and continues the program.
Selection in a structure diagram: The hexagon appears as a parent node. Its children represent the different branches (e.g., "if" branch and "else" branch).
Selection in a flowchart: The decision diamond has two exits — Yes/True and No/False — each leading to different process boxes, which rejoin below the selection.
Worked examples
All examples use the same scenario: a cinema ticket price calculator. The program asks for age and whether the customer has a student card, then sets the price (under 12: £5, student: £8, full price: £12).
Use the structure diagram above to trace through the design of the cinema ticket calculator. Read top-down, left-to-right.
Use the flowchart above to trace the cinema ticket calculator. Every flowchart symbol has a specific role.
price = 0 before any input is collected. This ensures the variable exists before it is used.age < 12. This creates two branches labelled Yes and No.hasStudentCard. Both diamonds rejoin below before the output step.Use the flowchart from Example 2. Tracing means following the arrows using specific input values and recording which path is taken. The trace table below shows three scenarios.
| Scenario | age | hasStudentCard | Trace path | Ticket price |
|---|---|---|---|---|
| Child visitor | 9 | False | START → init → input age → input card → age < 12? YES → price = 5 → display → END | £5 |
| Adult student | 20 | True | START → init → input age → input card → age < 12? NO → hasStudentCard? YES → price = 8 → display → END | £8 |
| Full price adult | 35 | False | START → init → input age → input card → age < 12? NO → hasStudentCard? NO → price = 12 → display → END | £12 |
Scenario: A program calculates a delivery charge. If an order total is £50 or more, delivery is free. If under £50, delivery costs £3.99.
Answer the following:
- What symbol would you use to show the decision "Is the order total ≥ 50?" in a structure diagram?
- In a flowchart, how would a loop be represented if the program repeated for multiple orders?
- Describe a flowchart for this program from START to END, naming each symbol used.
- A selection symbol (hexagon) — it represents a decision point where the program branches into different paths.
- By drawing an arrow from a later point back up to an earlier point, creating a circuit. There is no loop symbol in flowcharts — the loop shape belongs to structure diagrams only.
- START (terminal) → deliveryCharge = 0 (initialisation hexagon) → Input: orderTotal (input/output parallelogram) → orderTotal ≥ 50? (decision diamond) → Yes: deliveryCharge = 0 (process rectangle) / No: deliveryCharge = 3.99 (process rectangle) → Both branches rejoin → Display deliveryCharge (input/output parallelogram) → END (terminal).
Design questions appear every year and often carry 3–4 marks. Two types appear: reading (identify a symbol, trace a diagram) and creating (draw or complete a design).
For reading questions: "identify" means name the symbol or state the type. "State the type of loop" requires one word — e.g., conditional loop or fixed loop.
For creating questions: use correct shapes, label all decision branches Yes/No, include START and END for flowcharts, and read top-down/left-right for structure diagrams. Partial marks are available, so attempt every part even if unsure.
draw.io (diagrams.net) is a free, browser-based tool with built-in flowchart shapes. For the N5 assignment you may be asked to produce a design as evidence — practise using it now.
Past paper mapping: 2025 Q8(a)(b)(c) — reading and creating design notations; 2024 Q10(a)(b) — identifying notation type and reading a structure diagram; 2023 Q5 — flowchart reading; 2022 Q4(a)(b) — identifying and completing a structure diagram; 2019 Q16(a)(b)(c) — reading and creating flowcharts.
Questions 1–5 are auto-checked. Questions 6–9 are self-marked — write your answer, then reveal the model answer to check your work.
1. What shape is used to represent a loop in a structure diagram? TYPE 1
2. Which flowchart symbol is used to show that a variable is being given its starting value? TYPE 1
3. In a flowchart, how is a loop shown? TYPE 1
4. A decision diamond labelled score > 50? has two exits. What should they be labelled? TYPE 1
5. Which of the following is NOT a symbol used in structure diagrams? TYPE 1
6. A program asks a user to enter 10 test scores and calculates the total. In a structure diagram, draw and label: (a) the root node (b) a child node using a loop symbol (c) the children below the loop. Use draw.io to create your diagram, then upload or paste your diagram below. TYPE 2
(b) Loop child (stadium shape): "Repeat 10 times".
(c) Two process rectangles below the loop: "Get score from user" and "Add score to total". These are the steps that repeat on each iteration.
7. For this flowchart sequence — START → [price = 0] → [Input age] → Is age < 16? → Yes: [price = 5.50] → [Display price] → END / No: [price = 9.00] — identify the symbol type for: (a) START, (b) price = 0, (c) Input age, (d) Is age < 16?, (e) price = 5.50. TYPE 2
(b) Initialisation (hexagon) — setting the variable's starting value.
(c) Input/Output (parallelogram) — receiving data from the user.
(d) Decision (diamond) — evaluates a condition with two exits: Yes and No.
(e) Process (rectangle) — performing a calculation or assignment.
8. A program asks a user to enter a password. If correct, display "Access granted"; if not, display "Access denied". Draw a complete flowchart for this program using draw.io. Your flowchart must use correct symbol shapes, label all decision branches Yes/No, and include START and END terminals. Upload or paste your diagram as evidence below. 📐 draw.io quick guide TYPE 3
→ correctPassword = "letmein" (initialisation hexagon)
→ Input userPassword (input/output parallelogram)
→ userPassword = correctPassword? (decision diamond — two exits labelled Yes and No)
→ Yes → Display "Access granted" (input/output parallelogram) → END (terminal oval)
→ No → Display "Access denied" (input/output parallelogram) → END (terminal oval)
Note: both branches end at an END terminal. All decision exits must be labelled.
9. Using draw.io (diagrams.net), create a structure diagram OR flowchart for this program: "A program asks the user to enter a temperature in Celsius. If below 0, display 'Ice'. If 0–99, display 'Liquid'. If 100 or above, display 'Steam'." Export your diagram as a PNG and upload it below. 📐 draw.io quick guide TYPE 3
✔ Correct symbols used throughout (no wrong shapes).
✔ All three outcomes shown: Ice, Liquid, Steam.
✔ If flowchart: START and END terminals present; decision branches labelled Yes/No; arrows show clear direction of flow.
✔ If structure diagram: root node present; read top-down, left-to-right; selection hexagons used for the two decisions.
✔ Control flow is unambiguous — a reader could trace any input through the diagram without confusion.
Suggested timing: 60 minutes. Warm up 8 min; vocabulary 5 min; notes + symbol grids 12 min; worked examples 15 min; now you try 8 min; task set 12 min.
Key misconception to address: Many pupils think flowcharts have a loop symbol. Emphasise clearly: flowcharts use back-arrows for repetition — the stadium loop shape belongs to structure diagrams only. This distinction appears regularly in past papers.
Live demo suggestion: Put a simple scenario on the board (e.g., even/odd number checker). Have the class tell you which symbol to draw next as you build the flowchart live on the whiteboard. Then build the equivalent structure diagram and compare them side by side.
Extension question: Given the same program, ask pupils to convert between notations — structure diagram to flowchart and vice versa. This tests genuine understanding rather than symbol memorisation.
SQA command words covered: "identify" (name a symbol or construct), "state" (one-word answer, e.g. type of loop), "describe" (explain purpose of a symbol or section), "design/create" (draw a correct complete diagram).
Past paper mapping: 2025 Q8(a)(b)(c); 2024 Q10(a)(b); 2023 Q5; 2022 Q4(a)(b); 2019 Q16(a)(b)(c).
Assignment relevance: The SDD assignment typically requires a design (structure diagram or flowchart) as evidence for Task 1. Q9 is deliberate draw.io practice for this.