Community resourceWorksheet
1CP2-CT-1.2 Decomposition and abstraction
Part 2 of 7 · 1CP2-CT-1 · Programming foundations
The second Computational thinking worksheet, teaching decomposition and abstraction as two techniques that work together.
Students will:
- break a problem into purposeful sub-problems and say why that helps
- decide which details a model should keep and which it should leave out
- relate the detail kept to the purpose the model serves
- apply both techniques to an unfamiliar system
- explain a design decision rather than merely describe it
Inside: 11 explanation cells, 3 multiple-choice questions, 1 fill-in-the-blanks cell and 3 written answers. 19 marks, about 45 minutes.
Series: 1CP2-CT-1 · Programming foundations, part 2 of 7.
Shared by Coding PathwayVerified teacher
- 18 cells
- About 45 minutes
- CC BY-SA 4.0
- Shared 17 Aug 2026
Preview
The whole resource, exactly as a class sees it. Answers and marking are held back.
Decomposition and abstraction
Complex problems can feel difficult because there are many details to think about at once. Computer scientists use ways of thinking that make those problems clearer.
In this worksheet, you will learn how to:
- use decomposition to divide a problem into purposeful parts;
- use abstraction to decide which details matter for a model;
- explain how each technique helps someone understand or solve a problem;
- apply both techniques to a new situation.
Worksheet 1 introduced problems and algorithms. This worksheet remains independently usable, so the essential ideas are re-established before application. Each idea is explained and modelled before you use it. You will begin with supported checks, then finish with an independent school garden scenario.
Problems and models
A problem is a goal that needs a solution. A problem might be creating a library loan system, planning a journey or monitoring a garden.
A model is a useful representation of something. It is not always a physical object. A map, a table of bus times and a description of a computer system can all be models. A model is designed for a purpose, so it needs the details that help with that purpose.
Computational thinking means using structured ways of thinking that help us understand problems and design solutions. Two important techniques are decomposition and abstraction. They do different jobs, but they are often used together.
1. Decomposition: divide the problem
Decomposition means dividing a problem or system into smaller, purposeful sub-problems. Each sub-problem is one part of the original goal.
A useful method is:
- State the overall goal.
- Identify the different responsibilities within that goal.
- Check that the parts together cover the whole goal.
- Understand, design, solve or test each part separately.
This helps because each part contains less to think about at one time. Different parts can be designed or tested separately, and faults can be traced to a smaller area. When the parts work together, they solve the original problem.
Decomposition is not simply breaking words or objects into arbitrary pieces. The smaller parts must help someone understand or solve the original problem.
Worked model: a school library loan system
The overall goal is to lend an available book to an eligible student and record the loan correctly. The diagram divides that goal into five responsibilities.
For example, a developer can test the check book part with available and unavailable books without also testing how the final message is displayed. That makes a fault easier to locate. The parts must still be connected correctly for the whole loan system to work.
Modelling an explanation
Question: Explain one benefit of decomposing the library loan system.
A complete answer could be:
The system can be divided so that checking whether a book is available is a separate sub-problem. A developer can design and test that smaller part without dealing with the whole loan process at once. This makes a fault in the availability check easier to find and correct.
Notice the three links:
- It names a purposeful smaller part.
- It explains the immediate effect of separating that part.
- It links the effect to a benefit in the library context.
Saying only “it makes the problem easier” is too vague because it does not explain what becomes easier or why.
A team is planning a system for a school production. Which action is an example of decomposition?
- ALeave out the colour of each ticket because it does not affect seat availability.
- BSeparate the system into ticket sales, seat allocation and performance scheduling.
- CTry to design ticket sales, seat allocation and scheduling as one indivisible task.
- DKeep every possible detail about the production whether it affects the system or not.
2. Abstraction: keep the details that matter
Abstraction means creating a useful model by retaining relevant details and leaving out details that do not affect the model's purpose.
A useful method is:
- State exactly what the model must help someone decide, understand or do.
- List the details that could be represented.
- Ask whether each detail changes the required decision or output.
- Keep the relevant details and leave out the rest.
Abstraction reduces the amount of information someone must consider. This can make an important pattern, relationship or decision clearer.
The aim is not to remove as much as possible. Removing a relevant detail makes the model less useful or incorrect. A detail can also be relevant for one purpose but irrelevant for another.
Worked model: planning an accessible journey
The purpose of this model is to help a student choose a bus journey that arrives on time and meets their access needs. The model tests each possible detail against that purpose.
Accessibility information must be retained because it can change whether a journey is suitable. Bus colour does not change the route, arrival time or access decision, so it can be left out of this particular model. If the purpose were to plan a bus repaint, colour would become relevant.
Modelling an explanation
Question: Explain why journey duration is retained but bus colour is omitted from this model.
A complete answer could be:
Journey duration is retained because it affects whether the student arrives on time, which is part of the model's purpose. Bus colour is omitted because changing it would not change the route, arrival time or accessibility decision. Leaving out that irrelevant detail keeps the model focused and easier to use.
The answer does not simply label one detail relevant and one irrelevant. It tests each detail against the stated purpose and explains the effect on the model.
A model helps a wheelchair user choose an accessible room for an after-school club. Which design shows useful abstraction?
- ARemove doorway width because removing more detail always creates a better abstraction.
- BKeep every recorded detail about every room, even when it cannot affect access.
- CKeep doorway width and lift access, but leave out the colour of the wall display.
- DDivide the room-booking system into booking, access checking and confirmation parts.
3. Using both techniques together
Decomposition and abstraction answer different questions:
| Technique | Main question | Result |
|---|---|---|
| Decomposition | Which smaller responsibilities make up this problem? | A set of purposeful sub-problems |
| Abstraction | Which details matter for this purpose? | A focused model of a part or situation |
Imagine a system for running a community music event. A developer might first decompose it into performer scheduling, ticket booking, room allocation and equipment tracking. Inside performer scheduling, the developer could use abstraction by retaining each performer's available times and required setup duration but leaving out their favourite food.
The techniques support each other. Decomposition gives the developer a smaller part to focus on. Abstraction then reduces that part to the information needed for its purpose. The clearer model makes the scheduling part easier to design and check.
- abstraction
- decomposition
- purpose
- sub-problems
4. Building an explanation
When a question says Explain, link the technique to an effect and then to a benefit in the stated context. A useful structure is:
technique or choice -> immediate effect -> contextual benefit
Worked example in a new context:
A flood-warning problem can be decomposed so that reading water-level sensors is a separate sub-problem. This lets the sensor-reading rules be tested with several water levels without running the entire warning system. Incorrect readings can therefore be found and corrected before they cause an unreliable warning.
The response names the technique, explains what changes and gives a consequence that matters in the context. Your independent responses will use a different context, so use the structure rather than copying the details.
5. Independent application: school garden monitoring
A school wants a system that helps a gardening group decide when different garden beds need water.
The available information includes:
- a moisture reading from each garden bed;
- the plant type in each bed;
- the safe moisture range for that plant type;
- the date and time of the reading;
- the colour of the sensor case;
- the name of the student who painted the garden sign.
The system must collect readings, decide whether a bed needs water, store a short record and show a clear message.
For the next three tasks:
- Make choices that serve the stated watering purpose.
- Name concrete parts or details from this scenario.
- Explain the effect of your choice, not only that it makes the task “easier”.
- Write in full sentences.
Decompose the school garden monitoring problem into two purposeful sub-problems. Explain one benefit of separating the problem in this way.
Name two distinct responsibilities that help achieve the overall watering goal. Then use the chain: separation -> immediate effect -> benefit in this system.
Students type their answer here.
For the garden system's watering decision, identify one detail to retain and one detail to leave out. Explain each choice by linking it to the model's purpose.
Ask whether changing the detail could change the decision about watering a garden bed.
Students type their answer here.
Explain how decomposition and abstraction could work together when designing the school garden monitoring system.
Explain the job of decomposition, the job of abstraction inside a chosen part, and the benefit to this system.
Students type their answer here.
Which statement gives the most accurate relationship between a model's purpose and abstraction?
- AA detail can be relevant for one purpose and irrelevant for another purpose.
- BA detail that is omitted once must be omitted from every future model.
- CThe best abstraction is always the model that contains the fewest details.
- DThe model's purpose matters only during decomposition, not during abstraction.