Free revision guides

Data flow in a top-level design

Higher Computing Science: Software design and development

Data flow was asked in every Higher paper from 2022 to 2026, and the examiners' reports for 2023, 2024 and 2025 name it as one of the areas candidates find hardest. The rules are short, and exact.

What data flow shows

A top-level design breaks a program into steps. The data flow says, for each step, which data goes in (what the step needs) and which comes out (what it produces). Later, these become the parameters of the sub-programs.

A ski club's program reads its members' names and race times from a file, finds the fastest member, counts how many beat the club record, and displays the results:

Top-level design with data flow
StepInOut
1. Read names and times from the filenames[], times[]
2. Find the position of the fastest timetimes[]fastPos
3. Count the times under the club recordtimes[], recordcount
4. Display the fastest name and the countnames[], fastPos, count
Where the marks are
  • Arrays as arrays. An array is written with brackets, times[] (any shape of bracket); a single value without them, fastPos.
  • Only what the step needs. Step 2 finds a position in the times, so it needs times[] and nothing else. Adding names[] is an extra parameter, and loses the mark for that step.
  • Out is what the step produces. Step 2 produces fastPos. A value that goes in is not also an out unless the step changes it.

Three checks before you write

  • Read each step's wording: what does it use? Those are its ins.
  • What does it work out or read? Those are its outs.
  • Does a later step use that value? Then it must be an out of an earlier step.

Data flow also matters when the paper asks you to write a sub-program's first line: the ins become its formal parameters, so getting them exact pays twice.

Try two exam-style questions

Choose an answer, say how sure you are, then press Check. Every wrong answer tells you why it is wrong.

The full course covers every topic like this. Every topic in Higher Computing Science has a short note, and a practice quiz with feedback on every answer, plus coding lessons in Python, SQL and HTML, a full mock exam and a progress report for parents.

Create an accountTry more for freeAbout the course

More guides

This site is independent: it is not connected to the SQA or Qualifications Scotland. Points from the examiners' course reports are given in our own words.