The structured approach to programming – AQA GCSE Computer Science lesson (8525)
Pupils learn to describe the structured approach to programming and explain its advantages, and restructure a program into subroutines.
Lesson 6 of 14 in unit 11.1 Cyber Security and Robust Programs, taught in Year 11, Autumn 1. It answers one big question: What makes a program easy to build, test and change?
By the end, pupils can describe the structured approach to programming and explain its advantages, and restructure a program into subroutines.
- The Build (the main task)
- Describe the structured approach to programming. (2 marks) Explain one advantage of the structured approach. (2 marks) Rewrite the program in the class's language using the structured approach: a function that returns the cost of the pairs from the price and quantity; a function that returns the delivery charge from the subtotal; and a main program that uses them. Use meaningful identifiers. (5 marks)
- Support version
- The long program with its sections already marked, and the subroutine headers written.
- Challenge
- Explain how the structured approach helps two programmers work on Kickstand's program at the same time. (4 marks) Kickstand adds a discount code: KICK10 takes 10% off the subtotal. Extend your structured program in the class's language with a function applyDiscount(subtotal, code) that returns the new subtotal, and use it before working out delivery. (6 marks)
- Real-world link
- Kickstand's order program grows too long to manage.
- Key words
- Structured programming, Modular and Maintainability, each with a definition, an icon and a common mix-up on the key vocabulary slide.
- Misconceptions it tackles
- “Structured just means tidy code with comments”; “'It is easier' is an advantage”.
- AQA 8525 specification
- 3.2.10 (structured programming and subroutines); 3.2.2.
Every lesson follows the same Code & Commerce structure: a Bell Task recall starter, key vocabulary with definitions and icons, short teaching chunks with a check before pupils move on, The Build (one main task), challenge questions that get harder, and an exit question. Answers reveal one at a time on the slides, and everything is editable PowerPoint and Word.
Pupils need computers for the main task.
Also sold in the Cyber Security and Robust Programs unit bundle, which includes the medium term plan, and in the full-year and complete-course bundles.
Choose your school's Paper 1 language when you buy: C#, Python or VB.NET. You get that language's files: every program, code example, worked answer and programming task is written in it, and lessons with no code are the same in all three. Algorithms are also shown in AQA pseudo-code, as in the exam.
An independent resource written for AQA GCSE Computer Science (8525). It is not endorsed by AQA.
What's included
- Slide deck (PowerPoint)
- Lesson plan (Word)
- Worksheet (Word)
- Support worksheet with scaffolds (Word)
- Single-teacher licence: use and adapt it with your own classes
- Your choice of Paper 1 language: C#, Python or VB.NET
More for GCSE Computer Science (AQA)
See allPupils learn to define cyber security, describe its purposes, and describe viruses, trojans and spyware and how to protect against them.
Pupils learn to explain what a subroutine is, tell procedures from functions, and write and call both in the class's language and AQA pseudo-code.
Pupils learn to describe blagging, phishing and shouldering and how to protect against social engineering.
Written for the specifications named. Not endorsed by or affiliated with any exam board.