Skip to content
Marlbridge

Revision Notes

OxfordAQA A-Level Computer Science: Program design (9645) – Revision Notes

Condensed OxfordAQA A-Level Computer Science revision notes on program design, with key definitions, tracing steps and a quick self-test.

Level
AS LEVEL
Topic
Program design
Updated

Aligned to OxfordAQA A Level Computer Science (9645), 2024-onwards. Official specification .

Syllabus topics and points this page is mapped to

9645 (AS Level)

  • 3 Program design (topic-level mapping)

"Topic-level mapping" means this page belongs to that topic; it does not claim to cover every point in it.

Found an error? Report a correction.

These notes condense section 3.3 Program design (3.3.1 to 3.3.4) of the OxfordAQA International AS and A-level Computer Science (9645) specification, Version 1.1, for International AS exams May/June 2025 onwards and International A-level exams May/June 2026 onwards. All of it is AS content, also needed for the full International A-level. For full explanations and worked examples, use the program design study guide. Then test yourself with the practice questions.

Course hub: /boards/oxfordaqa/a-level/computer-science/. Checklist: /checklists/oxfordaqa/a-level/computer-science/. Free 10-minute checks: /diagnostics/.

Key definitions

Term Definition to learn
Structured approach Designing and building a program from separate modules, passing data by parameters and return values, using local (or block scope) variables
Hierarchy chart Diagram of the modules in a program, each placed below the module that calls it
Structure chart A hierarchy-style chart that also shows the data passed between modules
Abstraction Removing unnecessary details from a problem to make it easier to solve
Decomposition Breaking a problem into sub-problems, each of which does an identifiable task and may be broken down further
Algorithm A sequence of steps that can be followed to complete a task and that always terminates
Critical path The part of a solution that everything else depends on
Normal data Typical valid data that should be accepted
Boundary data Values at the edges of the valid range and just outside them
Erroneous data Data that should be rejected

3.3.1 Structured approach

The three features to name:

  1. Modularised programming: one module (subroutine) per task.
  2. Parameters in, return values out.
  3. Local variables (block scope in C# and VB.Net, where the language supports it).

Advantages (give a reason with each):

  • Modules are tested separately, so faults are easier to locate.
  • Several programmers can work on different modules at once.
  • Modules can be reused.
  • Easier to read and maintain: a change is made in one place.
  • Local variables prevent one module changing data another depends on.

The full treatment of subroutines, parameters and scope is in section 3.1.2.7. See the procedural programming revision notes.

Hierarchy chart vs structure chart

Hierarchy chart Structure chart
Shows the modules Yes Yes
Shows which module calls which Yes Yes
Shows data passed between modules No Yes: parameters down, return values up

Method: building a hierarchy chart

  1. Put the whole program in one box at the top.
  2. List the main tasks from the problem description. Each becomes a box on the second level.
  3. Split any task that does more than one job into its own level below it.
  4. Stop when each box is one task you could write as one subroutine.
  5. For a structure chart, label each link with the data going down and the data coming back.

Tiny example, a library self-checkout:

Self-checkout
├── Scan card        ↑ borrowerID
├── Scan book        ↑ bookID
├── Record loan      ↓ borrowerID, bookID   ↑ dueDate
└── Print slip       ↓ dueDate
A tree with "Gym class booking" at the top. Under it are four modules: Read member ID, Choose class, Check spaces and Confirm booking. Choose class has two modules below it: Show timetable and Validate choice. Confirm booking has two below it: Update register and Print receipt. Lines show which module calls which; there are no decisions, loops or data.
A hierarchy chart is a tree of modules: the whole program at the top, each module under the module that calls it.
The main module "Gym class booking" on the left is joined to four modules on the right. Read member ID returns memberID. Choose class returns classCode. Check spaces is passed classCode and returns spacesLeft. Confirm booking is passed memberID and classCode and returns nothing. Arrows to the right show data passed in; arrows to the left show values returned.
A structure chart adds the data: parameters passed down into a module and values returned back up.

3.3.2 Abstraction and decomposition

Must-know distinction:

  • Abstraction asks “what can I leave out?” It removes detail.
  • Decomposition asks “what smaller jobs is this made of?” It divides the problem.

Abstraction shapes the data model. Decomposition shapes the module structure. Decomposition can be carried out using subroutines.

Reminder: for a cinema seat-booking program, abstraction keeps seat row, seat number, price band and booked or free. It drops the seat colour and the fabric. Decomposition splits the program into “show seating plan”, “select seats”, “take payment” and “issue tickets”.

A tree starts with "Produce monthly bill" and splits it into four sub-problems: Get readings, Calculate units used, Calculate charge and Output bill. Calculate charge is split again into Apply unit rate and Add standing charge. Each box is one identifiable task.
Decomposition breaks a problem into sub-problems, and a sub-problem can be broken down again.
Seven details of a real parcel locker are listed. Four are kept and flow into a record with four fields: locker number, size, occupied or not, and collection code. Three are left out, marked with crosses: the locker colour, the metal it is made from, and the courier vehicle.
Abstraction removes unnecessary detail, leaving a simple data model: one record per locker with four fields.

3.3.3 Algorithms, pseudocode and tracing

  • The defining feature to remember: an algorithm always terminates.
  • You must understand pseudocode and convert it to program code. The specification says you will not be expected to write pseudocode in the exam.
  • The specification doesn’t set out its own pseudo-code conventions. These notes use language-neutral pseudo-code with ← for assignment and arrays indexed from 0.

Method: hand-tracing

  1. One column per variable, plus one for output.
  2. Write the starting values in the first row.
  3. Work line by line. Change a value only when the line that changes it runs.
  4. Check each loop condition with the current values before going round again.
  5. Record output at the moment it happens.
  6. Compare the final result with what the algorithm is meant to do.

Worked reminder:

total ← 0
k ← 1
WHILE k < 20
    total ← total + k
    k ← k * 3
ENDWHILE
OUTPUT total
total k k < 20?
0 1 true
1 3 true
4 9 true
13 27 false

Output: 13.

Method: converting pseudocode to code

  1. Match each loop’s bounds exactly. FOR i ← 0 TO n − 1 is for i in range(n) in Python.
  2. Turn ← into assignment, and = in a condition into the language’s comparison (== in Python and C#).
  3. Keep the same variable names unless the question says otherwise.
  4. If the question asks for a subroutine, include the parameters and return the value.
  5. Run the code with the values from the question and compare the output with your trace.
A table with one column per loop pass i from 0 to 7. The readings row is 0, 3, 5, 0, 2, 4, 1, 0, with wet days shaded. The current row counts the wet run: 0, 1, 2, 0, 1, 2, 3, 0. The best row is 0, 1, 2, 2, 2, 2, 3, 3. A bracket under indexes 4 to 6 marks the longest run, so the output is 3.
Reading down each column shows one pass of the loop: current counts the wet run and best keeps the largest value.

3.3.4 Aspects of software development

Aspect What to be aware of
Analysis Define the problem; establish requirements by interaction with intended users; create a data model; may use prototyping or an agile approach
Design Plan data structures, algorithms, modular structure and the user interface; can be iterative
Implementation Turn models and algorithms into data structures and code; may be iterative, solving the critical path first
Testing Test for errors using normal, boundary and erroneous data
Evaluation Judge the system on criteria including correctness, efficiency and maintainability

Method: choosing test data for a range rule

  1. Normal: one or two values comfortably inside the range.
  2. Boundary: the lowest and highest valid values, and the values just outside each.
  3. Erroneous: a value of the wrong type, or a missing value.
  4. Write the expected result beside every value.

For a month number from 1 to 12: normal 7; boundary 1 and 12 (accept), 0 and 13 (reject); erroneous “June” or blank (reject).

Evaluation criteria in one line each:

  • Correctness: right output for all valid input, and sensible handling of invalid input.
  • Efficiency: reasonable use of processing time and memory.
  • Maintainability: other programmers can understand, fix and extend it.

Quick self-test

  1. State the three features of the structured approach named in the specification.
  2. What does a structure chart show that a hierarchy chart does not?
  3. Define abstraction.
  4. Define decomposition, and name the programming feature used to achieve it.
  5. What property must a sequence of steps have to count as an algorithm?
  6. Trace this and give the output:
    data ← [12, 7, 20, 9, 16]
    c ← 0
    FOR i ← 0 TO 4
        IF data[i] MOD 4 = 0 THEN
            c ← c + 1
        ENDIF
    ENDFOR
    OUTPUT c
  7. Trace this for n = 472 and give the final value of r:
    r ← 0
    WHILE n > 0
        r ← r * 10 + n MOD 10
        n ← n DIV 10
    ENDWHILE
  8. How are a system’s requirements established during analysis?
  9. What is the critical path, and why is it solved first?
  10. A field accepts a house number from 1 to 250. Give the four boundary test values.
  11. Name the three evaluation criteria listed in the specification.

Answers

  1. Modularised programming; the use of parameters and return values; local (or block scope) variables.
  2. The data passed between modules: parameters going down and return values coming back.
  3. Removing unnecessary details from a problem to make it easier to solve.
  4. Breaking a problem into sub-problems, each doing an identifiable task and possibly broken down further. Achieved with subroutines.
  5. It must always terminate.
  6. 12, 20 and 16 are multiples of 4, so the output is 3.
  7. After each pass: n = 47, r = 2; n = 4, r = 27; n = 0, r = 274. Final r = 274, the digits reversed.
  8. By interaction with the intended users of the system, possibly using prototyping or an agile approach.
  9. The part of the solution that everything else depends on. It is solved first because nothing else can work or be tested properly until it does.
  10. 1 and 250 (accept); 0 and 251 (reject).
  11. Correctness, efficiency and maintainability.
A number line of password lengths from 0 to 20 with the accepted band from 10 to 16 shaded. Normal test: length 12, accept. Boundary tests: 9 and 17 are just outside and are rejected; 10 and 16 are on the edges and are accepted. Erroneous tests: lengths 0 and 40 are rejected.
Boundary tests sit on both edges of the valid range and just outside it; erroneous data should always be rejected.
Five stages stacked top to bottom with arrows between them: Analysis (define the problem and requirements), Design (data, algorithms, interface), Implementation (code it, critical path first), Testing (normal, boundary, erroneous data) and Evaluation (correct, efficient, maintainable). An arrow on the right goes from the bottom back to the top, showing that development can be iterative using prototyping or an agile approach.
The five aspects of software development, which can be repeated iteratively with prototyping or an agile approach.

Where marks are usually lost

  • Drawing a hierarchy chart like a flowchart, with decision boxes and loops, instead of a tree of modules.
  • Drawing a structure chart without labelling the data on each link.
  • Saying abstraction “hides” detail, without saying the detail is unnecessary and removing it makes the problem easier to solve.
  • Defining an algorithm without the word “terminates”.
  • Writing pseudocode when the question asks for program code in your chosen language.
  • Starting or ending a converted loop one place too early or too late.
  • Changing a variable in the trace table before the line that changes it.
  • Giving boundary values on only one side of a limit.
  • Listing an advantage of the structured approach with no reason, such as “easier” without saying why.
  • Naming “speed” as an evaluation criterion instead of efficiency in time and memory.

Frequently asked questions

What is the difference between a hierarchy chart and a structure chart? Both show the modules of a program and which module calls which. A structure chart also shows the data passed between modules, such as parameters and return values.

What is the difference between abstraction and decomposition? Abstraction removes unnecessary details from a problem, asking “what can I leave out?”. Decomposition breaks a problem into smaller sub-problems, asking “what smaller jobs is this made of?”.

What are the three features of the structured approach in OxfordAQA 9645? The features to name are modularised programming, with one module per task; parameters in and return values out; and local variables, or block scope where the language supports it.

Will you be asked to write pseudocode in the 9645 exam? No. You must understand pseudocode and convert it to program code, but the specification says you will not be asked to write pseudocode. Writing pseudocode when the question asks for program code loses marks.

What are the evaluation criteria for a software system? The specification lists correctness, efficiency and maintainability. Name efficiency in terms of processing time and memory rather than just “speed”.

Official syllabus

OxfordAQA International AS and A-level Computer Science (9645) specification, Version 1.1, for International AS exams May/June 2025 onwards and International A-level exams May/June 2026 onwards, published by OxfordAQA. Section 3.3 Program design.

Related resources

Get free revision emails (optional)

Occasional emails with practice questions, worked explanations and links to free resources for the qualification and subjects you choose. No spam, and you can unsubscribe from any email. The free tools on this site never need an email.