Skip to content
VirtusAcademy

Structured Programming

FoundationHigherAQA

Learn Structured Programming for GCSE Computer Science with this free worksheet and full mark scheme — Foundation and Higher exam-style questions with worked answers for AQA GCSE Computer Science (8525). Structured programming breaks a solution into subroutines with clear, documented interfaces.

Free downloads

These worksheets and mark schemes are original, written for Virtus Academy and checked against the current AQA specification. Every worksheet comes with a full mark scheme.

Topic overview

Structured programming is an approach that breaks a program into small, self-contained subroutines with clearly defined purposes.

Each subroutine does one job, uses parameters to receive data and return values to send results back, and relies on local variables rather than global ones. The program is built by combining these pieces.

The benefits are practical rather than theoretical. The program is easier to read, because each part has a clear name and purpose. It is easier to test, because each subroutine can be checked independently. It is easier to maintain, because a change affects only one place. And subroutines can be reused in other programs, saving work.

Revision notes

What it involves

Breaking a program into small, self-contained subroutines, each with one clearly defined job.

Data is passed in through parameters and out through return values. Local variables are used in preference to global ones, keeping each subroutine independent.

The benefits

Easier to read, because each part has a clear name and purpose.

Easier to test, because subroutines can be checked independently. Easier to maintain, because a change affects one place. Reusable, because a subroutine can be used in other programs.

Working in teams

Structured programming allows different people to work on different subroutines at the same time.

As long as each agrees what parameters and return values a subroutine uses, the parts can be written independently and combined afterwards.

Key points

  • Structured programming uses self-contained subroutines.
  • Each subroutine has one clearly defined job.
  • Data passes through parameters and return values.
  • Local variables are preferred.
  • Programs are easier to test and maintain.
  • Subroutines can be reused in other programs.

Worked examples

Example 1

State two benefits of structured programming. [2 marks]

Working

Each subroutine can be tested independently, making errors easier to locategive the first benefit
Subroutines can be reused in other programs, saving development timegive the second benefit

Example 2

Explain how structured programming helps a team work on one program. [2 marks]

Working

Different people can write different subroutines at the same timestate what it allows
as long as they agree in advance what parameters and return values each subroutine usesstate the condition

Example 3

Explain why structured programming makes maintenance easier. [2 marks]

Working

Each subroutine has one clearly defined job and is self-containedstate the property
so a change only affects that subroutine rather than requiring changes throughout the programexplain the benefit

Common mistakes

  • Listing benefits without explaining them.

    Say why each benefit follows from the approach.

  • Confusing structured programming with decomposition.

    Decomposition is analysing the problem; structured programming is how the code is organised.

  • Using global variables in a structured program.

    Local variables and parameters keep subroutines independent.

  • Writing one large subroutine.

    Each should have one clearly defined job.

Exam tips

  • Explain each benefit rather than just naming it.
  • Link structured programming to parameters and local variables.
  • Mention team working as a benefit.
  • Say self-contained and one clearly defined job.

Key terms

Structured programming
Organising code into self-contained subroutines.
Self-contained
Not depending on code outside itself.
Maintainable
Easy to modify without unintended effects.
Reusable
Able to be used in other programs.

Written and reviewed against the current AQA specification. Spotted an error? Let us know.