- Home
- Lessons
- GCSE & IGCSE Computer Science
- Decomposition and abstraction
Decomposition and abstraction
🎬 The doodle video for this lesson is coming soon. Subscribe on YouTube to see it first.
Computational thinking is how programmers tackle big problems. Two key skills are breaking problems down and hiding unnecessary detail.
Decomposition
Decomposition means breaking a problem into smaller, more manageable sub-problems.
Each part can be solved, tested and even shared between team members separately.
Each part can be solved, tested and even shared between team members separately.
Abstraction
Abstraction means removing unnecessary detail to focus on what matters.
A London Underground map is an abstraction: it shows stations and connections, not real distances or streets.
A London Underground map is an abstraction: it shows stations and connections, not real distances or streets.
Why it helps
Smaller parts are easier to understand, write and test.
Abstraction makes models simpler, so programs are quicker to write and run.
Together they let programmers tackle problems that would be too complex in one go.
Abstraction makes models simpler, so programs are quicker to write and run.
Together they let programmers tackle problems that would be too complex in one go.
Decompose the problem: "Create a quiz game."
- Store the questions and answers.
- Display a question and get the player's answer.
- Check the answer and update the score.
- Show the final score at the end.
Answer: Store questions, ask, check and score, show result.
Decomposition breaks a problem into smaller sub-problems. Abstraction removes unnecessary detail. Both make complex problems manageable.
Check you have got it
Answer 6 quick questions with instant marking. If you get one wrong, GCSE-ready shows you why and gives you another go. It is free, and you do not need an account.