Computational thinking skills

Computer Science AS · Algorithm design and problem-solving. The idea in plain words, the rules to remember, the mistake to avoid and a worked example, written and checked by Mega Lecture.

Test this topic freeAll Computer Science AS topics

The idea

Computational thinking is a way of approaching a problem so that a computer can help to solve it. Two of its skills are abstraction and decomposition.

Abstraction means keeping only the details that are needed to solve the problem and leaving out the rest. The result is an abstract model: a simpler version of the real system. A map is a good example. It shows roads and towns but not every tree.

Decomposition means breaking a problem into smaller sub-problems, and breaking those down again, until each one is easy to solve. Each small part can then be written as a program module, which is a procedure or a function.

In simpler words

Computational thinking helps you solve problems so a computer can help. Abstraction means keeping only the details you need and ignoring the rest. A map shows roads but not every tree. Decomposition means breaking a big problem into smaller parts, again and again, until each part is easy. Each small part can become a procedure or function in the program.

An everyday comparison

Decomposition is like planning a wedding: split it into venue, food and guests, then split food into menu, caterer and drinks, until each job is simple. Abstraction is like a train map that shows stations and lines but not real distances. The comparison stops working because program modules must also fit together through defined inputs and outputs, such as parameters and return values, which wedding jobs do not need.

Rules to remember

Common mistake

Students swap the two terms. Abstraction removes detail; decomposition splits the problem into parts. Neither one is the same as writing the code.

In the exam

Define the term in one sentence, then apply it to the scenario in the question. For abstraction, list which details are kept and which are left out, and why. For decomposition, show the problem split into named sub-problems, ideally as modules. Then give benefits: abstraction makes the problem simpler, the program shorter and uses less memory; decomposition lets modules be written and tested separately, shared and reused. Do not confuse either with writing code.

Worked example

A program will calculate the cost of delivering a parcel. The cost depends on the weight of the parcel and the distance travelled. Which of these belong in the abstract model: weight, colour of the box, distance, name of the driver?

  1. The purpose of the model is to calculate a delivery cost.
  2. Weight and distance are used in the calculation, so they are essential details.
  3. The colour of the box and the name of the driver do not change the cost, so abstraction removes them.

Answer: Keep weight and distance; leave out the colour of the box and the name of the driver.

Ask about this

Type what you are stuck on. The helper finds the explanation, worked examples and the notes to read, free and instant.

Keep going

← Data Definition Language (DDL) and Data Manipulation Language (DML)Algorithms →Take a Computer Science AS test