Programming project: build and test – AQA GCSE Computer Science lesson (8525)
Pupils learn to build and test their planned program, correcting errors and refining it.
Lesson 8 of 10 in unit 10.6 Protocols, Network Security and Sorting, taught in Year 10, Summer 2. It answers one big question: How do we know our program really works?
By the end, pupils can build and test their planned program, correcting errors and refining it.
- The Build (the main task)
- Write a program that: inputs the names and scores of four players; uses a subroutine that rejects any score that is not from 0 to 100 and asks again; outputs every player's name and score; uses a function that returns the position of the highest score to output the winner's name and score. (6 marks) Test your program with the scores in the test log. Complete the log, then record one error you found and how you corrected it. (2 marks)
- Support version
- Starter code for one subroutine and a test log template.
- Challenge
- Explain the difference between a syntax error and a logic error, using an example of each from a leaderboard program. (4 marks) Refine your program: write a subroutine sortBoard that uses a bubble sort to put the players in order, highest score first, keeping each name with its score. Then output the sorted leaderboard. (6 marks) Explain three tests you would add to check the sorted leaderboard. For each give the scores you would input, the expected output and why the test is useful. (6 marks)
- Real-world link
- A leaderboard the café can use on tournament day.
- Key words
- Test data, Logic error and Refine, each with a definition, an icon and a common mix-up on the key vocabulary slide.
- Misconceptions it tackles
- “A program that runs is finished”; “A logic error stops the program running”.
- AQA 8525 specification
- 3.2.11 (testing and refining (programming project)).
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 Protocols, Network Security and Sorting 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)
- Programming project - build and test - Quiz Quiz Trade Cards
- 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 a network protocol and explain the purpose of TCP, IP, HTTP, HTTPS, SMTP and IMAP.
Pupils learn to explain and carry out a bubble sort, showing the list each time the order changes.
Pupils learn to name and describe the four layers of the TCP/IP model and say which protocols work at each.
Written for the specifications named. Not endorsed by or affiliated with any exam board.