SLIDE 1 / 10
CSZone.co.uk
OCR H446 · Component 2 · 2.1.1

Thinking Abstractly
& Decomposition

OCR A Level Computer Science · cszone.co.uk
H446 SpecA Level
Learning Objectives

By the end of this topic you will be able to:

Define abstraction and explain its role in problem solving
Distinguish between representational, data and procedural abstraction
Explain decomposition and how it is applied to break down problems
Describe patterns and generalisation in problem solving
Abstraction

What is Abstraction?

Abstraction is the process of removing unnecessary detail and focusing only on what is relevant for the problem at hand. It simplifies complex systems by creating a model that highlights the essential features and hides irrelevant implementation details.
Representational Abstraction
Remove irrelevant details to create a model. A map is an abstraction of a real city — it shows roads and buildings but omits textures, colours, heights. The model is simpler but still useful for navigation.
Data Abstraction
Define data structures by their interface (what operations they support) rather than how they are implemented. A stack exposes push/pop — users don't need to know if it's array-based or linked-list-based.
Levels of Abstraction

Abstraction Layers in Computing

Procedural abstraction: a subroutine (function/procedure) is a named block of code that hides its implementation. The caller knows what the function does (its interface) but not how it does it.
Layers of abstraction in software: high-level language → compiler → assembly → machine code → hardware. Each layer hides the complexity of the layer below it from the layer above.
The OSI network model is another example — each layer provides services to the layer above and hides its implementation. Application layer code doesn't need to know about physical cable standards.
Good abstraction reduces complexity, makes code reusable and maintainable. Poor abstraction (too much or too little detail) leads to inefficient, hard-to-maintain systems.
Decomposition

Decomposition

Decomposition is breaking a complex problem down into smaller, more manageable sub-problems that can be solved independently and then combined. This is fundamental to programming — large programs are decomposed into modules/functions.
Top-down design: start with the main problem, break it into sub-tasks, then break those into smaller sub-tasks until each task is simple enough to implement directly. Each level of the hierarchy adds detail.
Benefits
Easier to understand; can be worked on by different team members in parallel; modules can be tested independently; reusable across projects
Example: Decompose "Bank System"
→ Login, Account Management, Transactions
→ Transactions: Deposit, Withdraw, Transfer, History
Patterns & Generalisation

Pattern Recognition and Generalisation

Pattern recognition: identifying similarities and common features between problems. Recognising that different problems share the same underlying structure — e.g. sorting a list of names uses the same algorithm as sorting a list of numbers.
Generalisation: applying a solution to a broader class of problems. A general sort algorithm works for any data type that can be compared. A general search algorithm works for any ordered list.
Pattern recognition → generalisation → abstraction: spot the pattern, generalise the solution, abstract away irrelevant detail. These three skills together are core to computational thinking and are assessed in OCR H446 Component 2.
Exam Practice
OCR H446 Style · 4 marks
A software team is developing a hospital patient management system. Describe how they might use abstraction and decomposition to manage the development of this system.
[4 marks]
2
Abstraction: the team abstracts the real-world hospital by focusing only on relevant details — patient records, appointments, prescriptions — and hiding irrelevant physical details. Procedural abstraction allows modules (e.g. getPatientRecord()) to be used without knowing their implementation, making the system modular.
2
Decomposition: the team breaks the system into sub-systems: Patient Registration, Appointment Booking, Prescriptions, Billing. Each sub-system is further broken down (e.g. Appointments → Book, Cancel, Remind), allowing different developers to work in parallel on independently testable components.
Common Mistakes

Don't Lose Marks

!
Saying abstraction means making things simpler without further qualification — abstraction specifically means removing irrelevant detail while retaining the essential features needed for the purpose. "Making things simpler" alone is too vague for OCR mark schemes.
!
Confusing decomposition with abstraction — decomposition breaks a problem into smaller parts; abstraction hides detail. They are different techniques that are often used together. OCR exam questions specifically test whether students can distinguish between them.
!
Not relating abstraction to a specific context in scenario questions — always tie your answer to the given scenario. "The team uses abstraction" scores 0; "The team abstracts patient data by focusing on [specific relevant fields]" scores a mark.
2.1.1a Complete
Well done! ✓
Thinking Abstractly and Decomposition
Return to lesson to continue