Skip to content
Cambridge AS & A Level9618

Computational Thinking Skills

Computer Science 9618 Chapter Notes

Last updated November 2026

ShareWhatsAppPost

Computational Thinking Skills notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Computational Thinking Skills notes as text: skim, search, and jump between subtopics.

~15 min read

1. The purpose of abstraction

The purpose of abstraction is to filter out information that is not necessary to solve the problem, so that only essential information is included.

The benefit is that the solution is easier to design / implement / solve.

Abstraction filters out information. Decomposition, covered later in this note, breaks a problem into parts. They are different processes.

Examiner insight

“Many candidates did not give an acceptable description.” “Several answers related to a later stage in the development cycle and referred to removing data from an already written program.”

Worked example 11 mark

A school has a library system which allows students to borrow books for a length of time. A new module needs to be written to generate emails to send to students who have an overdue book. The process of abstraction has been used when designing the new module.

State the purpose of applying abstraction to this problem.

  1. 1

    To filter out information that is not necessary to solve the problem // to include only essential information [1]

2. Choosing the information that is required

To produce an abstract model, read the scenario and choose the items the new module needs. Give each item a justification: say what the module does with it.

For example, item: mobile phone number. Justification: to send the text message.

Use only items the scenario gives. An item that can be worked out from another item is not also needed.

Examiner insight

“There was a tendency to describe a piece of information rather than to justify why it would be needed in the new module.” “Items that could be inferred from another item were not generally given credit.”

Worked example 13 marks

A fitness club has a computerised membership system. The fitness club offers a number of different exercise classes.

The following information is stored for each club member: name, home address, email address, mobile phone number, date of birth and the exercise(s) they are interested in.

When an exercise class is planned, a new module will send personalised text messages to each member who has expressed an interest in that exercise.

Identify three items of information that will be required by the new module. Justify your choices with reference to the given scenario.

  1. 1

    Item: mobile phone number. Justification: to send the text message [1]

  2. 2

    Item: name. Justification: to personalise the text message [1]

  3. 3

    Item: exercise interest. Justification: to determine whether this member would be interested [1]

3. Leaving out what is not required

An abstract model also leaves things out. An item is not required when the new module does not use it for its task.

Say why it is not needed in this scenario. Stating that it is not needed earns no mark on its own.

For a module that emails customers, postal address is not required because the module is sending an email, not a letter. Payment details are not required because nothing is being bought / sold at this stage.

Examiner insight

“Simply stating that a particular item was not needed was not sufficient.” “Marks were not given for reference to information that was not given in the question.”

Worked example 12 marks

A computer system for a shop stores information about each customer. The items of information include name and address (both postal and email) together with payment details and order history. The system also stores the product categories they are interested in and how they would like to be contacted.

The shop wants to add a program module that will generate emails to be sent to customers who may be interested in receiving details of new products.

Identify two items of customer information that would not be required by the new module. Justify your choice in each case.

  1. 1

    Item: postal address. Justification: sending an email, not a letter [1]

  2. 2

    Item: payment details. Justification: nothing being bought / sold at this stage [1]

4. Operations on the model

A model also needs the operations that process its data. An operation is an action the module carries out on the data in the scenario.

For a text-message module, operations include add a member to a list of those interested in the class and remove the member from future SMS messages.

Tie each operation to the scenario.

Examiner insight

“Many suggested pseudocode operators such as MOD or DIV.” “Many answers referenced generic operations such as ‘storage’ or ‘validation’ without linking these to the scenario.”

Worked example 12 marks

When an exercise class is planned, a new module will send personalised text messages to each member of a fitness club who has expressed an interest in that exercise. Members wishing to join the class send a text message back. Members may decide not to receive future text messages by replying with the message ‘STOP’.

Identify two operations that would be required to process data when the new module receives a text message back from a member.

  1. 1

    Add a member to a list of those interested in the new class [1]

  2. 2

    Remove the member from future SMS messages [1]

5. What decomposition is

Decomposition is breaking a problem down into sub-problems. This helps to explain, in more detail, how the task is carried out.

It leads to the program being designed as a series of modules (procedures / functions). It also makes the program easier to test / debug.

When the question names a system, refer to that system. The mark scheme gives at most 2 of the 3 marks if the system is not mentioned.

Worked example 13 marks

A program is being developed to help the manager of a shop control the stock. Decomposition has been used to design the program to help the shop manager control the stock.

Describe decomposition.

  1. 1

    Breaking a problem down into sub problems [1]

  2. 2

    In order to explain / understand in more detail how stock control can be managed [1]

  3. 3

    Leading to the program being designed as a series of modules / procedures / functions [1]

6. Naming the sub-modules

When a module is decomposed, each sub-module solves one sub-problem. Give each sub-module a name and its use.

For a module that texts members on a waiting list, the sub-modules could identify the member, get the phone number, create the message and send the message.

A good name is not enough. The use must say what the sub-module does.

Examiner insight

“At times marks were lost for the justification being too vague although the module name given seemed appropriate.”

Worked example 13 marks

A fitness club has a computerised membership system. Many classes are full, and the club creates a waiting list for each class. When the system identifies that a space is available in one of the classes, a new module will send a text message to each member who is on the waiting list. Decomposition will be used to break the new module into sub‑modules (sub‑problems).

Identify three sub‑modules that could be used in the design and describe their use.

  1. 1

    Module: IdentifyMember(). Use: identifies a club member who has expressed an interest in a given class [1]

  2. 2

    Module: GetMemberPhoneNumber(). Use: gets the mobile phone number of a member [1]

  3. 3

    Module: CreateMessage() (or SendMessage()). Use: generates a text message to a member (or sends it to a member in the waiting list) [1]

7. Benefits of decomposition

Breaking a complex problem down makes it easier to understand / solve.

Smaller problems are easier to program / test / maintain.

Sub-problems can be given to different teams / programmers with different expertise, and can be solved separately.

Worked example 13 marks

The process of decomposition is used to break down a complex problem into sub-problems.

Describe three benefits of this approach.

  1. 1

    Breaking a complex problem down makes it easier to understand / solve [1]

  2. 2

    Smaller problems are easier to program / test / maintain [1]

  3. 3

    Sub-problems can be given to different teams / programmers with different expertise // can be solved separately [1]

8. Modules and the structure chart

Decomposition leads to program modules. Each module is a procedure or a function. A structure chart shows the modules and which module calls which.

A module header gives the module's name and parameters. A function header also has `RETURNS` and a data type. A procedure header does not. Both appear in the mark scheme:

``` PROCEDURE Sub-A (Name : STRING, BYREF P2 : BOOLEAN) FUNCTION Sub-B (P1 : REAL) RETURNS REAL ```

A diamond on the line to the lower modules shows selection: one of them is called.

Examiner insight

“To gain both marks the answer must make it clear that Module-A calls the other three modules and that this process is repeated.” “Most candidates missed the need to include a selection shape as indicated by the word ‘either’ in the phrase ‘Module-D() will call either Module-X() or Module-Y()’.”

Worked example 12 marks

The structure chart for part of a membership program shows a module Update above three modules Sub-A, Sub-B and Sub-C. A diamond symbol, labelled A, sits at the bottom of the Update box, where the lines to Sub-A, Sub-B and Sub-C begin.

Explain the meaning of the diamond symbol (labelled with the letter A) in the chart.

  1. 1

    Reference to selection / decision / if [1]

  2. 2

    Update calls (one of) either Sub-A, Sub-B or Sub-C: all four modules named [1]

Recap

  • The purpose of abstraction is to filter out information that is not necessary and include only essential information. It makes the solution easier to design, implement and solve.
  • For each item the model needs, give the item and a justification: what the module does with it.
  • For each item left out, say why the scenario does not need it.
  • An operation is an action on the scenario's data, such as add a member to a list. It is not an operator such as `MOD` or `DIV`.
  • Decomposition is breaking a problem down into sub-problems. It leads to a series of modules (procedures / functions).
  • Name each sub-module and say what it does. Benefits: easier to understand, program, test and maintain, and work can be shared.
  • A function header has `RETURNS` and a type. A procedure header does not. A diamond in a structure chart means selection.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. A programmer uses abstraction when designing a program. (a) State the purpose of abstraction. (b) State one advantage of using abstraction.2 marks
    Answer
    1. (a)
    2. To filter out information that is not necessary to solve the problem // to include only essential information [1].
    3. (b)
    4. It makes the solution easier to design / implement / solve [1].

    Trap: Describing abstraction as hiding data from the user or removing data from a finished program.

  2. A school wants a program to produce its timetable. Describe decomposition as it applies to this problem.2 marks
    Answer
    1. Decomposition is breaking the timetable problem down into sub-problems [1].
    2. This leads to the program being designed as a series of modules (procedures / functions) [1].

    Trap: Describing abstraction (leaving out detail) instead of breaking the problem into parts, and giving no reference to the timetable.

  3. A swimming club stores each member's name, home address, email address, mobile phone number, date of birth and the events they have entered. A new module sends a text message reminder to each member who has entered an event. Identify two items of information that the new module requires. Justify each choice.2 marks
    Answer
    1. Mobile phone number: to send the text message [1].
    2. Events entered: to decide which members should be sent a reminder [1].
    3. (Name is also accepted if justified, for example to personalise the message.)

    Trap: Describing what the item is ("the phone number of the member") instead of justifying why the module needs it.

  4. The same swimming club module sends a text message reminder to each member who has entered an event. Identify two stored items that the module does not require. Justify each choice.2 marks
    Answer
    1. Home address: the reminder is sent as a text message, not posted [1].
    2. Email address: no email is being sent [1].
    3. (Date of birth is also accepted if justified, for example that it is not used to choose who is sent the reminder.)

    Trap: Writing "not needed" with no reason.

  5. A cinema stores each booking: customer name, film, showing time, seat numbers and amount paid. A booking is cancelled. Identify two operations that would be required to process the data.2 marks
    Answer
    1. Remove the booking from the list of bookings [1].
    2. Make the seats available for other customers again [1].
    3. (Refund the amount paid is also accepted.)

    Trap: Giving a generic word such as "validation" or "storage", or a pseudocode operator such as `MOD`, with no link to the cinema.

  6. A team of three programmers will write a weather forecast app. The lead programmer breaks the problem down into sub-problems. Describe three benefits of this approach.3 marks
    Answer
    1. Smaller problems are easier to understand / solve [1].
    2. Smaller modules are easier to program / test / maintain [1].
    3. Each sub-problem can be given to a different programmer, and solved separately [1].

    Trap: Writing "it is quicker" or "it is easier" with no reason or no link to what is easier.

  7. A quiz program asks ten questions, marks each answer and then shows the player's final score. Decomposition is used to design the program. Identify three sub-modules and describe the use of each.3 marks
    Answer
    1. Example: `AskQuestion()`, which displays a question and takes the player's answer [1].
    2. Example: `CheckAnswer()`, which compares the answer with the correct one and updates the score [1].
    3. Example: `DisplayScore()`, which shows the final score to the player [1].
    4. (Any three sub-modules that each solve one sub-problem of this quiz, each with a clear use, are accepted.)

    Trap: Giving a module name with a vague use such as "does the quiz".

  8. A structure chart shows a module Menu above three modules Play, Settings and Quit. A diamond symbol sits at the bottom of the Menu box, where the lines to the three modules begin. Explain what the diamond symbol means.2 marks
    Answer
    1. The diamond shows selection (a decision) [1].
    2. Menu calls one of Play, Settings or Quit [1].

    Trap: Saying Menu calls all three modules, or that the chart shows a loop.

  9. A bicycle hire scheme charges by the hour. Each bicycle has a unique bicycle ID. Each customer has a unique customer ID, which links to the customer's name, home address and mobile phone number in a customer file. An abstract model of a single hire is required. (a) State four items of data that must be stored each time a bicycle is hired. (b) Identify three operations that would be required to process the hire data when a customer returns a bicycle.5 marks
    Answer
    1. (a)
    2. Customer ID and bicycle ID [1].
    3. Start date / time of the hire and the return date / time or number of hours [1].
    4. (Cost of hire is also accepted. Customer name and phone number are not: they can be found from the customer ID.)
    5. (b)
    6. Record the bicycle as returned // end the hire [1].
    7. Change the bicycle's status from hired to available [1].
    8. Calculate the hire cost from the number of hours // process the payment [1].

    Trap: Storing customer name and phone number as well as customer ID (items that can be inferred from another item), and giving generic operations such as validation or storage, or operators such as `MOD`, with no link to the bicycle hire.

  10. A dental clinic stores for each patient: ID, name, home address, email address, mobile phone number, date of birth, date of last check-up and preferred contact method (text message or email). A new module sends a personalised reminder, by the preferred method, to each patient whose last check-up was more than six months ago. (a) Identify four items of patient information the new module will use. Justify each choice. (b) Identify one item that is not required. Justify your choice. (c) Decomposition is used on the new module. Identify three sub-modules and describe their use.8 marks
    Answer
    1. (a)
    2. Date of last check-up: to select which patients should be sent a reminder [1].
    3. Preferred contact method: to decide whether the reminder is sent as a text message or an email [1].
    4. Mobile phone number: to send the text message to a patient who prefers text // email address: to send the email to a patient who prefers email [1].
    5. Name: to personalise the reminder [1].
    6. (b)
    7. Home address: the reminder is sent by text message or email, not by post // date of birth: it is not used to choose who is sent a reminder or how [1].
    8. (c)
    9. `SelectPatients()`: finds each patient whose last check-up was more than six months ago [1].
    10. `GetContactMethod()`: gets the preferred contact method of a selected patient [1].
    11. `SendReminder()`: creates the personalised reminder and sends it by text message or email [1].

    Trap: Describing an item ("the patient's phone number") instead of justifying it, missing that both contact details are needed because the method varies, and answering (c) with abstraction (leaving out detail) instead of breaking the module into sub-problems.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
Abstraction hides data from the user, for example with user-permissions.Abstraction filters out information that is not necessary to solve the problem.
Postal address is not needed.Postal address is not needed because the module is sending an email, not a letter.
Operations are storage, validation or `MOD`.Operations fit the scenario: add a member to a list, remove the member from future SMS messages.
Decomposition breaks the program into smaller bits.Decomposition is breaking a problem down into sub problems, leading to a series of modules / procedures / functions.

Frequently asked questions

What is the purpose of abstraction in a program?
The purpose of abstraction is to filter out information that is not necessary to solve the problem, so that only essential information is included. The benefit is that the solution is easier to design, implement and solve. Abstraction filters out information that the problem does not need.
What is the difference between abstraction and decomposition?
Abstraction filters out information that is not necessary to solve the problem. Decomposition is breaking a problem down into sub-problems, which leads to the program being designed as a series of modules (procedures / functions). They are different processes, and a good answer keeps them apart.
How do I choose which items an abstract model should store?
Read the scenario and choose the items the new module needs. Give each item a justification: say what the module does with it. For example, mobile phone number is needed to send the text message. An item that is not required should be left out, with a reason, such as postal address not being required because the module is sending an email, not a letter.
What are the benefits of decomposition?
Breaking a complex problem down makes it easier to understand / solve. Smaller problems are easier to program / test / maintain. Sub-problems can be given to different teams / programmers with different expertise and can be solved separately. Each benefit needs a reason, not just the word easier.
How do I name and describe the sub-modules of a decomposed program?
Give each sub-module a name and its use. For example, IdentifyMember() has the use of identifying a club member who has expressed an interest in a given class. A good name is not enough: the use must say what the sub-module does.
Is abstraction the same as hiding data from the user?
No. Abstraction filters out information that is not necessary to solve the problem, so that only essential information is included. Many students confused the processes of abstraction and decomposition, and some referred to hiding data from the user or to user-permissions, which is not abstraction.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters