Revision Notes
OxfordAQA A-Level Computer Science (9645): Abstraction and decomposition – Revision Notes
Recall notes for OxfordAQA 9645 sub-topic 3.3.2: definitions of abstraction and decomposition, examples, benefits, exam traps and a self-test.
- Subject
- Computer Science
- Level
- AS LEVEL
- Topic
- Topic 3 – Program design
- Author
- Marlbridge Academic Team
- Updated
- Reviewed by
- Harris Khan (what this means)
Aligned to OxfordAQA A Level Computer Science (9645), 2024-onwards. Official specification .
Syllabus page (what it covers and how it is assessed): OxfordAQA A Level Computer Science.
Syllabus points this page covers
9645 (AS Level)
- 3.3.2 Abstraction and decomposition
This page covers 1 of the 4 subtopics in topic 3, Program design.
Found an error? Report a correction.
Need help with this topic? Request a free trial class for A Level Computer Science (9645).
These notes condense sub-topic 3.3.2 Abstraction and decomposition of OxfordAQA International AS and A-level Computer Science (9645), Version 1.1 (AS content in topic 3.3 Program design). For longer examples, see the abstraction and decomposition study guide; then practise with the abstraction and decomposition practice questions.
What the specification requires
- Be familiar with abstraction: removing unnecessary details from a problem to facilitate its solution.
- Be familiar with decomposition: breaking a problem into a number of sub-problems, so that each sub-problem accomplishes an identifiable task, which might itself be further subdivided.
- Know that decomposition can be achieved through the use of subroutines.
Key terms
| Term | Meaning |
|---|---|
| Abstraction | Removing unnecessary detail so that the problem is easier to solve |
| Decomposition | Breaking a problem into sub-problems, each with an identifiable task |
| Sub-problem | One part of a larger problem that can be solved on its own |
| Identifiable task | A piece of work you can name and describe |
| Procedural abstraction | Using a subroutine through its name and parameters without knowing its internals |
| Data model | The abstraction of real-world data held in a program |
| Subroutine | A named block of code that carries out a task; used to implement decomposition |
Abstraction: keep what the purpose needs
The same real object has different abstractions for different purposes.
| Object | Purpose | Kept | Removed |
|---|---|---|---|
| Railway network | Journey planning | Stations, lines, interchanges | Track curves, exact distances |
| Student | Library system | Name, ID, loans | Height, hobbies |
| Student | Timetable | Name, subjects, year | Loans, results |
| Bus route | Counting stops | Ordered stop names | Roads, traffic lights |
Rule: a detail is “unnecessary” only in relation to the purpose.
Decomposition: split into tasks
Car park system, split in two levels:
- Get entry and exit times.
- Work out the stay.
- Work out the fee: (3.1) up to 60 minutes is 2.00 pounds; (3.2) add 1.50 pounds per further hour or part hour; (3.3) cap at 12.00 pounds.
- Display the ticket.
Recomputed fees:
| Stay (minutes) | Further part hours | Fee (pounds) |
|---|---|---|
| 45 | 0 | 2.00 |
| 145 | 2 | 5.00 |
| 570 | 9 | 12.00 (15.50 before the cap) |
Each sub-problem becomes a subroutine that can be tested alone.
Bus route abstraction in code
route = ["Park", "School", "Library", "Market", "Station"]
def stops_between(start, end):
return abs(route.index(end) - route.index(start))
stops_between("Park", "Station") returns 4. The data model is just an ordered list.
Levels of abstraction
Abstraction can be layered. Each layer hides detail from the layer above it.
| Layer | What the user of this layer sees | What is hidden |
|---|---|---|
| Application | Click Save | Which file routines are called |
| Subroutine | save(document) |
The code inside save |
| Operating system | A file in a folder | Which sectors on the drive hold the data |
| Hardware | Bits stored and read | The electronics of the storage device |
A programmer working at one layer can ignore the detail of the layers below. This is why abstraction makes large systems manageable.
Decomposition checklist
- State the whole problem in one sentence.
- Split it into the main tasks. Check that each has a name and one purpose.
- Split any task that is still too large.
- Stop when each piece can be written as a short subroutine.
- Check that the pieces together solve the whole problem and nothing is missing.
Comparing the two
| Abstraction | Decomposition | |
|---|---|---|
| Asks | What can I ignore? | What are the parts? |
| Makes the problem | Simpler | Smaller |
| Output | A model with needed details only | A set of sub-problems |
| Seen in code as | Data model; calling a subroutine by name | Subroutines |
Benefits
| Technique | Benefits |
|---|---|
| Abstraction | Less complexity; focus on essentials; reusable general solution; subroutines usable without knowing their code |
| Decomposition | Manageable pieces; parallel work by a team; separate testing; easier to change one part |
How to answer
- Quote the definition (use the specification wording).
- Apply it to the scenario: say what is kept or removed, or list the sub-problems.
- Give a benefit tied to the scenario.
Exam traps
- Abstraction is not “hiding code”. It is removing unnecessary detail, judged against the purpose.
- Decomposition is not “shorter code”. It is splitting into sub-problems.
- One task per sub-problem. “Input and calculate and print” is not decomposed.
- Do not remove needed detail. The stop order must stay in the bus example.
- Sub-problems can be split again. Stop only when each is small enough to code.
- Use scenario words. “Calculate the fee” scores better than “do the calculation”.
Quick self-test
- Define abstraction.
- Define decomposition.
- How can decomposition be achieved in a program?
- Give one detail kept and one removed when abstracting a student for a library system.
- A railway map shows only stations and lines. Is this abstraction or decomposition?
- List three sub-problems for a program that runs a quiz.
- Why is
sqrt(x)an example of abstraction? - A car park stay is 145 minutes. Using the rules in these notes, what is the fee?
- Why can the sub-problems be tested separately?
- True or false: a sub-problem cannot be split further.
- What does “identifiable task” mean?
- Give one benefit of decomposition for a team.
Answers
- Removing unnecessary details from a problem to facilitate its solution.
- Breaking a problem into sub-problems, each accomplishing an identifiable task, which might be further subdivided.
- By using subroutines.
- Kept: name or loans (any needed item); removed: height or hobbies (any unneeded item).
- Abstraction.
- For example: ask a question, check the answer, keep the score, show the result.
- The programmer uses it without needing to know how the root is calculated.
- 5.00 pounds (2.00 plus two further part hours at 1.50).
- Each has a single task and a clear input and output.
- False. A sub-problem may itself be subdivided.
- A piece of work that can be named and described.
- Different programmers can write different parts at the same time.
- Abstraction and decomposition study guide
- Abstraction and decomposition practice questions
- Program design revision notes
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: sub-topic 3.3.2 Abstraction and decomposition.
Related resources
-
Study guides
OxfordAQA A-Level Computer Science (9645): Aspects of software development
OxfordAQA 9645 sub-topic 3.3.4 in depth: analysis, design, implementation, testing with normal, boundary and erroneous data, and evaluation.
Computer Science · OxfordAQA · AS Level
Read guide -
Practice questions
OxfordAQA A-Level Computer Science (9645): Aspects of software development – Practice Questions
Ten original OxfordAQA 9645 questions on sub-topic 3.3.4: analysis, design, the critical path, normal, boundary and erroneous test data, and evaluation.
Computer Science · OxfordAQA · AS Level
Try questions -
Revision notes
OxfordAQA A-Level Computer Science (9645): Aspects of software development – Revision Notes
Recall notes for OxfordAQA 9645 sub-topic 3.3.4: analysis, design, implementation, testing, evaluation, the critical path and a self-test.
Computer Science · OxfordAQA · AS Level
Revise topic
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.