KS3 · Computer Science

Abstraction in computational thinking

You could describe your best friend for an hour. A birthday-reminder app needs almost none of it. Ignoring details on purpose has a name: abstraction.

Computer Science · Abstraction

Same Sam, two different jobs

Pick a detail, then decide: does this job need it, or can it go?

The app's only job is to remind you when it's Sam's birthday. What does it need?

Still to sort

Keep it (0)

The job can't be done without this detail.

Where the line is: Keep a detail only if this job fails without it. 'It's true about Sam' isn't a reason on its own.

Remove or hide it (0)

The job works just as well without this detail.

Where the line is: Removing a detail doesn't mean it's false or worthless. It just doesn't help this job.

5 of 5 still to sort.

Sort Sam's details into keep or remove. Then switch the job and sort the very same details again. Watch what flips.

Watch out: A detail being true about Sam doesn't make it needed. The only test is: does this job fail without it?

Computer Science · Structure

A train map that's 'wrong' on purpose

A made-up city's train map. Every gap between stops is drawn the same length, whatever the real distance. Tap a stop to see what the map keeps and what it leaves out.

Line 1Line 2

Tap any part of the diagram to see what it does.

Computer Science · Algorithms

Trace table — dry run the code

A made-up model of a game character. The columns x, score and lives are its STATE. Each 'when' line is a BEHAVIOUR rule. Step through and watch the rules change the state.

1x = 0
2score = 0
3lives = 3
4when right arrow pressed: x = x + 1
5when coin collected: score = score + 10
6when hit by enemy: lives = lives - 1
event
x
score
lives
Press Start to run the first line.
·

Ready when you are — step through one line at a time.

Computer Science · Evaluating an abstraction

Is this coat-advice app a good model?

The claim

This made-up coat-advice app is a good abstraction for its job: telling you each morning whether to take a coat today.

Place each piece of evidence to load the balance. Mark the strong ones — they count double.

  1. It keeps the chance of rain.

    Evidence 1: does it support or challenge the claim?
  2. It keeps the temperature.

    Evidence 2: does it support or challenge the claim?
  3. It leaves out the pollen count and the sunset time.

    Evidence 3: does it support or challenge the claim?
  4. It stores the wind direction to the nearest degree.

    Evidence 4: does it support or challenge the claim?
  5. It stores the forecast for every town in the country, not just yours.

    Evidence 5: does it support or challenge the claim?
  6. It keeps one rain figure for the whole day, so it can't tell if rain is due when you walk home.

    Evidence 6: does it support or challenge the claim?

Computer Science · Computational thinking

Abstraction, or something else?

A team is building a library app. They split the job into searching, loans and returns. They decide each book's record keeps its title, author and shelf, but not how heavy the book is. And they write the exact steps the search uses to compare what you type with each book's record.

Which part of that is the abstraction? Pick the idea closest to what you think right now.
How sure are you?

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

Keep what the job needs. Hide the rest.

What you need to know

  • Abstraction means removing or hiding the details a problem doesn't need, and keeping the ones that matter.
  • The payoff: the problem becomes simpler to understand and simpler to solve.
  • What counts as important depends on the purpose. A must-have detail for one job can be useless for another.
  • Have a goYour friend is building an app that tells you when your phone needs charging. They're very proud it stores your phone case's colour. Keep that detail, or remove it?

    Remove it.

    The case colour has nothing to do with when the battery runs low. A detail being true about your phone doesn't make it needed for this job.

  • So one real-world thing can be abstracted in different ways, one for each purpose.
  • A transport map keeps the stops, the lines and how they connect, and drops exact distances, buildings and streets.
  • Have a goA tourist asks the train map: 'How far is it from one stop to the next?' Can the map answer?

    No.

    The map left out exact distances on purpose. Brilliant for seeing how stops connect, no use for measuring how far apart they are.

  • Computers use abstractions too: a computational abstraction is a model of a real problem or system that a computer can work with.
  • Its state is the data describing it at one moment, like a game character's position and score.
  • Its behaviour is the rules that describe how that state changes.
  • Have a goA model stores battery = 80. Its rule: each hour of use, battery = battery - 10. After 3 hours of use, what is the state?

    battery = 50

    The behaviour rule fired three times and each time changed the stored value. The rule stayed the same; only the state changed.

  • Evaluating a model means checking the balance: too much detail makes it complicated, too little makes it unhelpful or wrong.
  • In computational thinking, abstraction works alongside decomposition (breaking a problem into smaller parts) and designing algorithms.

The big picture

Abstraction means removing or hiding the details a problem doesn't need and keeping the ones that matter, so the problem gets simpler to understand and to solve. Which details matter depends on the purpose, so one real thing can be abstracted in different ways. A computer model records its state (its data at a moment) and its behaviour (the rules that change that data), and a good one keeps enough detail to be useful without becoming complicated.

Key points

1Abstraction is removing or hiding details that are not needed to solve a problem, and keeping the important ones, so the problem is simpler to understand and solve.
2Importance depends on purpose: a detail that is essential for one problem can be irrelevant to another, so the same thing can be abstracted in different ways.
3A transport map keeps the stops, the lines and how they connect, and leaves out exact distances, buildings and streets, because a traveller planning a route through the network needs the connections.
4A computational abstraction is a model a computer can work with. Its state is the data describing it at a given moment; its behaviour is the rules that change that state.
5Evaluate an abstraction against its purpose: too much detail makes it complicated, too little makes it unhelpful or wrong for its task.
6Abstraction is one part of computational thinking, used alongside decomposition (breaking a problem into smaller parts) and designing algorithms.

Worked example

Problem

Design an abstraction of a pet dog, Biscuit, for a 'walk reminder' app that tells the owner when the dog is due its next walk. Say what the model keeps and leaves out, then name its state and one piece of behaviour.

⚠ Watch out

Thinking abstraction means removing as much as possible. Take away a detail the purpose needs, like the date of birth from a birthday reminder, and the model stops working. Abstraction hides only the details the problem doesn't need and keeps the important ones.

🧠

Memory hook

Keep what the job needs, hide the rest. A train map is 'wrong' about distance on purpose, and that's exactly why it's useful.

✓

Check yourself

A school wants a computer model of each classroom so that rooms can be booked for lessons. Name two details the model should keep and two it could leave out, and say why for each.

Flashcards

(14)
What is abstraction?
Removing or hiding details that aren't needed to solve a problem, and keeping the important ones, so the problem is simpler to understand and solve.
What decides which details are important in an abstraction?
The purpose of the problem. A detail that is essential for one problem can be irrelevant to another.
Can one real-world thing have more than one good abstraction?
Yes. Different purposes need different details, so the same thing can be modelled in different ways.
Is a detail worth keeping just because it's true?
No. Keep it only if the purpose needs it. True but unneeded details just make the model bigger.
What does a transport map keep?
The stops, the lines and how they connect.
What does a transport map leave out, and why?
Exact distances, buildings and streets. A traveller planning a route through the network needs the connections, not those details.
What is a computational abstraction?
A model of a real-world problem or system that a computer can work with.
What is the state of a model?
The data that describes it at a given moment, for example a game character's position and score.
What is the behaviour of a model?
The rules that describe how its state changes, for example 'when a coin is collected, add 10 to the score'.
What are you judging when you evaluate an abstraction?
Whether it keeps enough detail to be accurate and useful for its purpose, while leaving out enough to stay manageable.
Too much detail or too little: what goes wrong with each?
Too much makes the model complicated. Too little makes it unhelpful or wrong for its task.
What is decomposition?
Breaking a problem into smaller parts.
Abstraction or decomposition: which one chooses the details to keep?
Abstraction. Decomposition splits the problem into parts; abstraction decides which details a model needs.
Name three techniques that are part of computational thinking.
Abstraction, decomposition and designing algorithms.

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 posted

More KS3 Computer Science topics

See the full KS3 Computer Science curriculum →

How this lesson was checked. This KS3 Computer Sciencelesson 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 27 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.

Helpful guides for parents and students