GCSE · Computer Science · Edexcel · Spec 1CP2
Abstraction
Try putting a whole football match into a computer: every blade of grass, every fan, every shout. Impossible, and pointless. The real skill is keeping only what your problem needs.
Why bother?
Reason it through
Why does abstraction make a problem easier to solve?
First link · your turn
You've left out every detail the problem doesn't need. What are you left with?
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
The trick isn't keeping less. It's keeping exactly what this problem needs.
What you need to know
- Abstraction means removing or hiding the details your problem doesn't need, so you can focus on the ones that matter.
- It's a decision, made for one particular problem: which details are relevant (keep them) and which are irrelevant (leave them out)?
Have a goYour friend is writing a program to find who won the school 100 m race. They want to store every runner's trainer colour, 'just in case'. Keep it or leave it out?
Leave it out. Finding the winner needs each runner's name and time, not their trainers.
'Just in case' isn't a reason: abstraction judges each detail against this problem, and trainer colour does nothing to find the winner.
- Relevance depends on purpose. The same real-world situation can be abstracted in different ways for different problems.
- So there's no fixed list of 'unimportant' details. One problem's useless detail can be another problem's essential one.
Have a goA train timetable app ignores the colour of the carriages. Invent a different problem about the same train where carriage colour would matter.
For example, a game that draws the train on screen, or a guide helping someone spot their train on the platform.
Colour is irrelevant to the timetable, not to everything. Change the purpose and a dropped detail can become one you must keep.
- What's left is a model: a simplified representation of part of the real world that keeps only the features needed.
- A model lets you analyse and solve a problem about that situation, including with a computer program.
- In a program, abstraction decides which data is stored and processed. Everything else is left out of the program.
Have a goA program tells each pupil which room their next lesson is in. From the pupil's name, their timetable (subject, time, room) and their favourite school lunch, which data must it store?
The name and the timetable. Favourite lunch stays out.
The program stores only what the model of this problem needs; favourite lunch is true about the pupil but finds no rooms.
- Why bother? It reduces complexity. A simpler model is easier to understand, easier to design a solution for and quicker to program.
- Bonus: the finished solution is less likely to contain unnecessary work.
- Decomposition breaks a large problem into sub-problems; abstraction removes the unnecessary detail from the problem and each sub-problem, so each can be solved.
The big picture
Abstraction means removing or hiding the details a problem doesn't need, so you can focus on the ones that matter. It's a decision: for this problem, what must be kept and what can be left out? Relevance depends on the problem, so one situation can be abstracted in different ways. What's left is a model, and in a program that model decides which data is stored and processed. Abstraction reduces complexity, and it works alongside decomposition, which breaks a problem into sub-problems.
Key points
Worked example
Problem
A school library wants a program that lets students search for books and borrow them. Show how decomposition and abstraction could be used together on this problem.
⚠ Watch out
Leaving a detail out because it 'doesn't matter', without asking: doesn't matter to WHAT? Judge every detail against the problem you've been given, not against how important it feels. The same detail can be useless in one question and essential in the next.
Memory hook
Keep what THIS problem needs. Leave out the rest. Change the problem, change what you keep.
Check yourself
Think of a bus. Name one detail a timetable program needs that a seating-plan program doesn't, and one detail the other way round. Why do the two programs keep different details?
Flashcards
(13)What is abstraction?
What decision do you make when you carry out abstraction?
Can the same situation be abstracted in more than one way?
Why is there no fixed list of 'irrelevant' details?
In abstraction, what is a model?
What is a model used for?
When a situation becomes a program, what does abstraction decide?
What is the main benefit of abstraction?
Give two ways a simpler model helps when writing a program.
How does abstraction affect the finished solution?
Decomposition vs abstraction: what does each do?
How are decomposition and abstraction used together?
Is the aim of abstraction to make a problem as simple as possible?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore Edexcel GCSE Computer Science topics
How this lesson was checked. This Edexcel GCSE Computer Science (specification 1CP2)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 30 October 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.