Skip to main content
ScotlandComputer ScienceSyllabus dot point

How do developers work out exactly what a program must do before writing it?

Analysis: identifying the purpose, scope and boundaries of a problem and writing functional requirements in terms of inputs, processes and outputs.

An SQA National 5 Computing Science answer on the analysis stage of software development, covering how to identify the purpose, scope and boundaries of a problem and how to write functional requirements in terms of the inputs, processes and outputs a finished program must provide.

Generated by Claude Opus 4.89 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this key area is asking
  2. The purpose of a program
  3. Scope and boundaries
  4. Functional requirements: inputs, processes and outputs
  5. Why analysis matters
  6. How this key area is examined
  7. For the official course specification

What this key area is asking

The SQA wants you to understand the analysis stage: how a developer pins down the purpose of a program, sets its scope and boundaries, and writes functional requirements as the inputs the program receives, the processes it carries out, and the outputs it produces.

The purpose of a program

Stating the purpose sounds obvious, but writing it down forces clarity. "A program to record a runner's lap times and report the fastest lap" is a purpose; it tells everyone involved what success looks like before a single line of code exists.

Scope and boundaries

For the lap-timer example, the scope might include entering lap times, finding the fastest lap and counting the laps. A boundary might be that the program handles at most twenty laps, or that it does not store results between runs. Setting boundaries protects the developer: anything outside them is, by agreement, not part of this program.

Functional requirements: inputs, processes and outputs

The heart of analysis is writing the functional requirements - exactly what the finished program must do, expressed as inputs, processes and outputs.

  • Inputs are data going into the program - typed by the user, read from a file, or chosen from options. Example: the lap times the user enters.
  • Processes are what the program does with the inputs - calculations, comparisons and decisions. Example: comparing the lap times to find the smallest (fastest).
  • Outputs are information coming out of the program - displayed on screen, saved to a file or printed. Example: showing the fastest lap.

Why analysis matters

Analysis is cheap to get right and expensive to get wrong. A requirement that is misunderstood at this stage may not be noticed until testing, by which time the whole program may have been built around the wrong idea. A complete, clear set of functional requirements also gives the developer something to test against later: every requirement should be checked by the testing stage, which is why analysis and testing are closely linked.

How this key area is examined

Questions give you a short scenario and ask you to identify inputs, processes and outputs, state the purpose, or describe the scope and boundaries. The reliable method is to read the scenario and sort every piece of data into one of the three categories, asking for each whether it goes in, gets worked out, or comes out. Marks are lost almost entirely by miscategorising a result as an input, so apply the "receive or work out?" test every time.

For the official course specification

The SQA publishes the full National 5 Computing Science course specification, specimen question papers and coursework tasks at sqa.org.uk. Always revise from the current specification and SQA past papers, because question style and terminology are board-specific.

Exam-style practice questions

Practice questions written in the style of SQA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

SQA N5 style3 marksA program will take a customer's order, work out the total cost including delivery, and display the amount to pay. Identify one input, one process and one output for this program.
Show worked answer →

One mark each for a correct input, process and output, so give one clear example of each.

Input: the customer's order (the items chosen), or the chosen delivery option.

Process: calculating the total cost by adding the item prices and the delivery charge.

Output: displaying the amount to pay.

Markers reward picking the correct category for each: an input is data going in, a process is a calculation or decision the program performs, and an output is information coming out. Putting "total cost" as an input, for example, would not gain the mark because it is produced by the program, not supplied to it.

SQA N5 style2 marksState what is meant by the scope and boundaries of a problem during analysis.
Show worked answer →

One mark for the idea of scope and one for the idea of boundaries.

Scope is the extent of what the program will do - the features and tasks that are included in the project.

Boundaries are the limits of the program - what is deliberately left out, or the conditions and ranges the program is expected to handle.

A good answer makes clear that scope and boundaries together fix what is in and what is out of the project, which stops the developer building the wrong thing.

Related dot points

Sources & how we know this