New
New
Year 10
AQA

Programming project: subroutines II

I can implement a program from a design and perform testing to ensure it works as expected.

New
New
Year 10
AQA

Programming project: subroutines II

I can implement a program from a design and perform testing to ensure it works as expected.

These resources will be removed by end of Summer Term 2025.

Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.

These resources were created for remote use during the pandemic and are not designed for classroom teaching.

Lesson details

Key learning points

  1. Implementation of solution is where you take a plan and create the solution.
  2. A program should be tested with a range of test data.
  3. Erroneous data is data that should not be accepted by the program or it will cause an error.
  4. Boundary data is data that should either be accepted or rejected by a program.
  5. Normal data is data that should be accepted by a program. This is data that you would expect a user to enter.

Keywords

  • Erroneous - data that should not be accepted by the program or it will cause an error.

  • Boundary - data that should either be accepted or rejected by a program; it tests the data right at the boundary of a range.

  • Normal - data that should be accepted by a program. This is data that you would expect a user to enter.

Common misconception

A system should only be tested with normal data that will be expected. If it works with normal data it will work all the time.

A system should be tested with a range of test data, including erroneous data that is not meant to be accepted. Programs should make sure that there is no way to stop the software from working if invalid inputs are entered.


To help you plan your year 10 computer science lesson on: Programming project: subroutines II, download all teaching resources for free and adapt to suit your pupils' needs...

This sceanrio can be tailored to better suit the interests of your pupils. The more they are familiar with the context of the problem they are solving, the easier it will be for them to focus on the creation of the program rather than understanding the problem itself.
Teacher tip

Equipment

Pupils need to be able to create programs in the language they are using for the course. Examples in this lesson are based in Python and examples are provided through the Raspberry Pi Code Editor.

Licence

This content is © Oak National Academy Limited (2025), licensed on Open Government Licence version 3.0 except where otherwise stated. See Oak's terms & conditions (Collection 2).

Lesson video

Loading...

Prior knowledge starter quiz

Download quiz pdf

6 Questions

Q1.
What is the purpose of a structure chart?
to visually represent the steps of an algorithm
to display the output of a program
to replace the need for flowcharts
Correct answer: to decide the hierarchy of subroutines in a program
Q2.
Which flowchart symbol is used to represent a decision?
rectangle
parallelogram
Correct answer: diamond
oval
Q3.
Which of the following correctly defines a parameter in a subroutine?
Correct answer: a variable passed into a subroutine
a value returned by a subroutine
a type of loop in programming
a function that runs at the start of a program
Q4.
A chart is a diagram used to illustrate the steps of an algorithm.
Correct Answer: flow
Q5.
Match the flowchart symbols with their meaning.
Correct Answer:oval,start/end of the program

start/end of the program

Correct Answer:rectangle,process

process

Correct Answer:diamond,decision

decision

Correct Answer:parallelogram,input/output

input/output

Q6.
What should be used if a subroutine needs to pass a value back to the main program?
a parameter
a variable
Correct answer: a return value
a loop

Assessment exit quiz

Download quiz pdf

6 Questions

Q1.
What is the purpose of iterative testing in programming?
to test the final version of the program only
Correct answer: to test throughout the program's creation and fix errors early
to test only erroneous data
to ensure the program runs without any debugging
Q2.
Which type of test data is used to check that values at the edge of a range are accepted?
erroneous
normal
Correct answer: boundary
exceptional
Q3.
Final testing occurs when ...
each block of code is tested separately.
Correct answer: the entire program is completed.
errors are corrected during development.
the program is still in the early design phase.
Q4.
A test is a way to thoroughly check that a program is working correctly.
Correct Answer: table
Q5.
Using a of test data helps ensure that a program correctly handles all possible inputs.
Correct Answer: range
Q6.
Match the test data type with its meaning.
Correct Answer:erroneous,data that should not be accepted because it causes an error

data that should not be accepted because it causes an error

Correct Answer:boundary,data at the limits of validity

data at the limits of validity

Correct Answer:normal,data that should be accepted as valid input

data that should be accepted as valid input

Additional material

Download additional material