HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
Planning a Program: Life Cycle, Decomposition and Flowcharts
  1. 1The program development life cycle
  2. 2Decomposition, abstraction and structure diagrams
  3. 3Flowcharts
  1. Computer Science
  2. /Planning a Program: Life Cycle, Decomposition and Flowcharts
  3. /Decomposition, abstraction and structure diagrams

Course 7.1·Lesson 2 of 3

Decomposition, abstraction and structure diagrams

Every computer system is made of sub-systems, and each sub-system is made of smaller ones. You decompose a problem into its inputs, processes, outputs and storage, use abstraction to keep only what matters, and draw a structure diagram that shows the parts of a system.

about 25 min1 simulation1 practice question
Lesson 2 of 3Show all lessonsHide
Planning a Program: Life Cycle, Decomposition and Flowcharts
  1. 1The program development life cycle
  2. 2Decomposition, abstraction and structure diagrams
  3. 3Flowcharts

Try the code and the simulations beside the lesson.

Big jobs are made of small jobs

How do you cook a meal for ten people? You do not think of it as one job. You plan the starter, the main dish and the pudding. The main dish splits again: buy the food, prepare it, cook it. Each small job is easy to do and easy to check.

A computer system is the same. Every computer system is made up of sub-systems, which are made up of further sub-systems. A sub-system is one part of a system that does one part of the job.

Decomposition

Decomposition means breaking a problem into smaller parts. The syllabus asks you to break a problem into four kinds of component part.

  • Inputs: the data that goes into the system.
  • Processes: what the system does with the data.
  • Outputs: what the system gives back.
  • Storage: the data the system must keep for later.

Here is a fitness band that counts steps.

  • Inputs: the readings of the movement sensor, and the daily goal the user sets.
  • Processes: count each step, add the steps to the total for the day, compare the total with the goal.
  • Outputs: the number of steps on the small screen, and a buzz when the goal is reached.
  • Storage: the total for each day, so that the user can look back at the week.

Why decompose? Each small part is easier to understand, design, code and test. Different programmers can work on different parts at the same time. A part that already exists, such as a routine that sorts a list, can be used again.

Abstraction

A map of a bus route shows the stops and the order of the stops. It does not show every house and tree. The map keeps what a passenger needs and leaves out the rest. That is abstraction: removing the details that do not matter to the problem, so that you can work with the ones that do.

In a quiz program, each question needs its text, its options and its right answer. The size of the font on a printed quiz does not matter to the program, so it is left out. Abstraction makes a problem smaller and clearer before it is decomposed.

Structure diagrams

A structure diagram shows how a system is decomposed. The whole system is the box at the top. Each level below breaks the box above it into its parts. The lowest boxes are small tasks that can each be written as one part of the program.

A structure diagram. The top box is School library system. Below it are three boxes: Members, Loans and Fines. Members splits into Add a member and Change details. Loans splits into Lend a book and Return a book. Fines splits into Work out a fine and Record a payment.

The diagram above decomposes a school library system into three sub-systems: members, loans and fines. Each of those splits again. For example, the loans sub-system has two tasks: lend a book and return a book. Read the diagram from the top down. A box always belongs to the box it is joined to above it.

Practise with new numbers

Try it in Python

In a program, each box of a structure diagram can become a subroutine: a named block of code that does one task. In Python a subroutine is written with def. You met functions in the Python Foundations book (the chapter "Functions: Name a Recipe"). The program below splits the ticket program into three sub-tasks.

Read it first. Then run it. Which line tests one part on its own?

1. Change the group to 2 adults and 5 children. Predict the total, then run it.

2. Add a fourth function that prints a welcome message, and call it first. Where would its box go in a structure diagram?

Common mistakes

  • Drawing a structure diagram as a flowchart. A structure diagram shows the parts of a system, not the order of steps. It has no arrows and no decisions.
  • Mixing up abstraction and decomposition. Abstraction leaves details out. Decomposition splits what is left into parts.
  • Leaving out storage. When you decompose a problem, ask what the system must keep for next time.
  • A box with one child that says the same thing. A box is split into two or more smaller tasks.

Remember these

  • Every computer system is made of sub-systems, which are made of further sub-systems.
  • Decompose a problem into inputs, processes, outputs and storage.
  • Abstraction keeps the details that matter and removes the rest.
  • A structure diagram shows a system at the top and its parts on each level below.

Check yourself

Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.

  1. A vending machine sells drinks. Name one input and one output.
  1. In the library diagram, which sub-system holds the task "Record a payment"?
  1. A program for a school sports day stores every race time. Is the race time an input, a process, an output or storage? It can be more than one.
  1. A weather app shows the temperature, but not the exact place of every weather station. Which idea is this?
  1. Give one reason a programming team decomposes a big problem.

References

  • Cambridge International, IGCSE Computer Science 0478 syllabus (2026, 2027 and 2028), unit 7, part 2: sub-systems, decomposition and methods of design.

Enroll free in Planning a Program: Life Cycle, Decomposition and Flowcharts

Every lesson is open to read. Enrolling also lets you:

  • Mark lessons done and carry on where you stopped.
  • Count the course towards the certificate for its chapter.
No payment. You can leave at any time.

Problems (3)

A school gives every pupil a card for the canteen…Medium · High School (9–10) · by StemPy Lab
A structure diagram for a home weather station has the top box "Weather station"…Easy · High School (9–10) · by StemPy Lab
A program plans train journeys between the towns of a country…Medium · High School (9–10) · by StemPy Lab
Next: lesson 3Flowcharts
← Planning a Program: Life Cycle, Decomposition and Flowcharts
← The program development life cycleFlowcharts →

Discussion (0)

Log in to join the discussion.

Loading…

1 Python program
5 questions to check yourself

This lesson is free to read. Enroll free to keep your place in the course.

Python Labs (1)

Split a ticket program into sub-tasksPython Lab · by StemPy Lab