The Stages of the Problem-Solving Process

MODULE 2 • LESSON 03

When a new piece of software fails, the cause is rarely a single typing mistake in the code. More often the team solved the wrong problem, missed something the users needed, or picked a solution that was too slow, too costly or too hard to use. Good programmers avoid this by following a problem-solving process: a set of stages that takes you from “something is wrong” to “a working solution that has been checked”.

In this lesson you will follow one realistic case study through every stage: a bus company that sells monthly passes to students. You will sort requirements into functional and non-functional, use a weighted decision matrix to compare three possible solutions and justify the best one, place real project activities in the right stage, and finally write the decision matrix as an algorithm and as a C program.

What you will learn

  • The stages of the problem-solving process, in order, and what each one produces.
  • How to write a clear problem definition, including its scope.
  • How to analyse a problem: fact-finding, inputs, processing, outputs and storage.
  • The difference between functional and non-functional requirements, with examples.
  • How to identify several possible solutions and evaluate them against criteria.
  • How to select the optimal solution and justify the choice in writing.
  • What happens during implementation and review, and why the process loops back.

Part 1: The process at a glance

The CAPE syllabus lists these stages of problem-solving:

StageKey questionMain output
1. Problem definitionWhat exactly is the problem, and what is (and is not) included?A problem statement and its scope
2. Problem analysisWhat does the solution need to do, and how well?Inputs, processing, outputs, storage; a list of functional and non-functional requirements
3. Identify and evaluate possible solutionsWhat different ways could we solve it, and how good is each one?Two or more alternatives, each assessed against criteria
4. Select and justify the optimal solutionWhich alternative is best for this situation, and why?A recommendation with reasons
5. Implementation and reviewDoes the chosen solution work once built, and does it solve the original problem?A tested, installed solution and a review of how well it works

Two ideas run through the whole process. First, each stage uses the output of the one before: you cannot compare solutions against requirements you never wrote down. Second, the process loops: if the review finds that the solution misses something, you go back to analysis (or even definition) and work forward again. Real projects pass through the stages many times.

This lesson uses one running example. Island Bus Co. runs school buses and sells monthly student passes. Passes are paper cards stamped at the office. At the start of every month the line at the office is about 40 minutes long, cards are often lost, and drivers have no quick way to spot a photocopied card. The manager asks you to “sort out the passes”.

Part 2: Stage 1 — Problem definition

“Sort out the passes” is not a problem you can solve: it is too vague. The first stage is to find out what is really wrong and to write it down in a short, precise problem statement that everyone agrees with. A good definition answers four questions:

  • What is happening now? Paper passes are bought in person and checked by eye.
  • What is wrong with it? Long lines, lost cards, and forged (photocopied) cards that drivers cannot detect.
  • Who is affected? Students and parents (time lost), office staff (rush at month start), drivers (cannot check passes), and the company (lost income).
  • What would success look like? Passes that are quick to buy and can be checked instantly and reliably on the bus.

Worked example — problem statement. “Island Bus Co. sells student passes in person on paper, which causes long lines at the start of each month and allows forged passes to be used. The company needs a way for students to buy passes quickly and for drivers to confirm instantly that a pass is genuine and current.”

Notice what the statement does not say: it does not say “build an app”. Naming a solution in the definition closes off alternatives before you have compared them, which is exactly what stage 3 is for.

Scope

The definition should also set the scope, or boundaries, of the project: what is included and what is not. For Island Bus Co., buying and checking student passes is in scope; adult fares, bus timetables and payroll are out of scope. Agreeing on scope early stops a project from slowly growing until it can never be finished (this is often called scope creep).

Part 3: Stage 2 — Problem analysis

Analysis means studying the problem in detail so that you know exactly what the solution must do. It has two parts: finding the facts, and organising them into requirements.

Finding the facts

MethodExample for Island Bus Co.Good for
InterviewsTalk to the manager, two office clerks and three drivers.Detailed answers and follow-up questions; few people.
QuestionnairesOnline survey sent to 300 parents.Many people quickly; easy to count results.
ObservationWatch the office on the first school day of the month; ride a bus at 6:30 a.m.Seeing what really happens, not what people remember.
Examining documentsStudy the pass cards, the sales book and last year’s income figures.Exact data formats and volumes (for example, 1 200 passes a month).

Inputs, processing, outputs and storage

A helpful way to organise what you find is an IPO view of the problem (often with storage added):

InputsProcessingOutputsStorage
Student ID, name, school, month, payment; a pass code scanned on the busRecord the sale; set the expiry date; check whether a scanned pass is valid; count salesA pass (code) for the student; “valid / not valid” for the driver; a monthly sales reportOne record per pass: student ID, month, expiry date, status

Functional and non-functional requirements

The main product of analysis is a list of requirements. The syllabus expects you to distinguish two kinds.

Functional requirements describe what the system must do: its features, the tasks it carries out, the data it accepts and the results it produces. A useful test: you can usually write a functional requirement as “The system must verb…” where the verb is an action such as record, calculate, search, print or send.

Non-functional requirements describe how well the system must do it, or the limits it must work within: speed, security, reliability, usability, compatibility, and constraints such as budget and deadline. They are qualities and constraints, not tasks.

Functional (what it does)Non-functional (how well / within what limits)
A student can buy a monthly pass online.A scan gives its result within 2 seconds. (performance)
The system stores each pass with the student ID and expiry date.Passwords are stored encrypted. (security)
A driver can scan a pass to check that it is valid.Runs on Android phones up to five years old. (compatibility)
The office can print a monthly sales report.A new driver can use it after 10 minutes of training. (usability)
A reminder is sent 3 days before a pass expires.Available from 5:30 a.m. to 8:00 p.m. on school days. (reliability)
Staff can cancel a lost pass.Total cost under $40 000; ready for September. (constraints)

Why does the difference matter? Functional requirements tell programmers which features to build. Non-functional requirements decide which solution is acceptable: two apps may have identical features, but if one takes 10 seconds to check a pass at a busy bus door, it fails the problem. Non-functional requirements are also easy to forget, because users rarely mention them until something goes wrong.

Try it 1Functional or non-functional?

These ten requirements came out of the Island Bus Co. analysis. Sort each one, then tap Check to see which you got right and why.

If you hesitated over "Only the manager may change prices", you are in good company. The rule itself (a check of who is allowed) is functional, because the system must carry it out. How strong the protection must be (for example, passwords of at least 12 characters, locked after 5 wrong tries) is non-functional. In an exam, explain your reasoning in one short clause and you will rarely lose the mark.

Part 4: Stage 3 — Identify and evaluate possible solutions

A common mistake is to jump straight from the problem to the first solution that comes to mind. The syllabus asks you to identify more than one possible solution and to evaluate each. Considering alternatives often reveals a cheaper or simpler answer, and it gives you something to compare against when you justify your final choice.

Identifying alternatives

For Island Bus Co. three realistic options are:

  • Option A — Buy a ticketing package. An existing (off-the-shelf) system used by other transport companies. Students still buy passes at the office, but get a printed card with a barcode that drivers scan.
  • Option B — A custom office application. A program written specially for the company, used by office staff to sell passes, with handheld scanners for drivers.
  • Option C — A web app with QR passes. Students or parents buy the pass online and get a QR code on their phone (or printed); drivers scan it with a phone app.

Other alternatives are possible, and some do not involve new software at all: for example, opening two extra sales windows during the first week of each month, and printing passes on hologram card that is hard to copy. Including a "low-tech" option is a sign of good analysis, and sometimes it wins.

Evaluating each alternative

Each alternative is judged against criteria taken from the requirements and constraints. Common criteria, sometimes grouped as types of feasibility, are:

CriterionQuestion to askIsland Bus Co. example
Cost (economic)Can the organisation afford to buy, run and maintain it?Package licence $25 000 vs custom build $60 000.
Time (schedule)Can it be ready by the deadline?The package can be running in one month; a custom app needs about six.
TechnicalDo we have, or can we get, the hardware, software and skills?Option C needs reliable mobile data on the buses.
Operational / ease of useWill people actually be able to use it in practice?Drivers must scan at the bus door in seconds.
Meets requirementsHow many requirements does it satisfy, and how well?The package cannot send expiry reminders.

Worked example — evaluating Option A. Strengths: low cost, quick to deliver, already proven elsewhere. Weaknesses: students must still visit the office (the long line remains), no expiry reminders, and the printed barcodes can be photocopied unless the card is checked against the database at each scan. Writing strengths and weaknesses like this for every option is the heart of evaluation.

Part 5: Stage 4 — Select and justify the optimal solution

The optimal solution is not "the best in every way"; it is the alternative that best fits this organisation’s requirements and constraints. A clear way to choose is a weighted decision matrix:

  1. List the criteria and give each a weight showing how much it matters (here 1 = minor, 5 = essential).
  2. Score each option on each criterion (1 = poor, 5 = excellent).
  3. For each option, multiply each score by its weight and add the results to get a weighted total.
  4. The option with the highest total is the recommended solution — then explain why in words.

Worked example. The manager says meeting the requirements matters most (weight 5), then ease of use for drivers and students (4), then cost (3), then speed of delivery (2).

Criterion (weight)A: PackageB: Custom appC: Web app
Low cost (3)5 → 152 → 63 → 9
Quick to deliver (2)5 → 102 → 43 → 6
Easy to use (4)3 → 124 → 165 → 20
Meets requirements (5)2 → 105 → 254 → 20
Weighted total475155

Option C has the highest total, so it is recommended. A matrix alone is not a justification, though. A justification connects the choice back to the problem and requirements:

"Option C, the web app with QR passes, is recommended. It removes the line at the office because passes are bought online, and every scan is checked against the database, so photocopied passes are detected. It is the easiest option for students and drivers to use, and although it costs more than the package, it stays within the $40 000 budget and meets every essential requirement except reminders by SMS, which can be added later. Option B meets slightly more requirements but would not be ready for September."

A good justification names the chosen option, gives two or three reasons tied to specific requirements or criteria, and admits a weakness or explains why the runner-up lost. That last part shows the examiner you really compared the options.

Try it 2Weighted decision matrix

Each criterion has a weight button (×3 means weight 3). Tap it to change how much that criterion matters (1 to 5, then back to 1). Tap a score cell to change how well an option does on that criterion. Watch the totals, the bar chart and the written justification update. Then try Cash-strapped company: what happens when cost and speed matter most?

With the "cash-strapped" weights (cost 5, speed 4, ease 2, requirements 2), the package wins with 55 points. Same options, same scores, different organisation, different optimal solution. That is why the word justify matters: the best solution depends on what this particular client values, and your job is to show that link.

Part 6: Stage 5 — Implementation and review

Implementation

Implementation turns the chosen solution into a working system that people use. For a software solution it usually includes:

  • Designing the algorithms for each module (Lessons 04 and 05 of this module, and the rest of the course, show how).
  • Coding the algorithms in a programming language such as C.
  • Testing with normal, boundary and invalid (erroneous) data, and fixing the errors that testing reveals. For example: a pass that expires today (boundary), a code that does not exist (invalid).
  • Installing the system and moving existing data across (for example, entering current pass holders).
  • Training users and writing user documentation.
  • Changeover from the old system to the new: all at once (direct), both side by side for a while (parallel), one route at a time (phased), or on one route first as a trial (pilot).

Island Bus Co. might run a pilot on two routes in August, keeping paper passes as a backup, then switch all routes in September. A pilot limits the damage if something goes wrong.

Review

Review (also called evaluation) checks the finished solution against the problem definition and the requirements: does it actually solve the problem? Typical review questions for Island Bus Co. after two months:

  • Is the office line shorter? (Measure it on the first school day.)
  • Have forged passes stopped? (Count scans that returned "not valid".)
  • Does every scan take less than 2 seconds? (Time a sample.)
  • What do drivers, students and office staff say? (Short interviews or a questionnaire.)

The review often leads to maintenance: fixing errors found in use (corrective), adapting to changes such as a new fare structure (adaptive), or adding improvements such as SMS reminders (perfective). Big changes send you back to analysis, and the cycle starts again. This is why the process is drawn as a loop rather than a straight line.

Try it 3Which stage is this?

Ten things happened during the Island Bus Co. project, in order. For each one, tap the stage it belongs to. The stage strip fills in as you go. Only your first try at each activity counts towards the score.

Part 7: The decision matrix as an algorithm and a C program

The weighted decision matrix is itself an algorithm, so it is a good place to practise the route you will use all through this module: describe it in words, write it as pseudocode, draw it as a flowchart, and only then write the C program.

1. Narrative

For each option in turn, start its total at zero. For each criterion, multiply the option’s score by the criterion’s weight and add it to the total. Print the option’s total. If this total is bigger than the best total found so far, remember it as the best and remember which option it was. When every option has been processed, print the recommended (best) option.

2. Pseudocode

bestTotal ← -1
best ← 0
FOR i ← 0 TO 2
   total ← 0
   FOR j ← 0 TO 3
      total ← total + weight[j] * score[i][j]
   ENDFOR
   OUTPUT option[i], total
   IF total > bestTotal THEN
      bestTotal ← total
      best ← i
   ENDIF
ENDFOR
OUTPUT "Recommended: ", option[best]

3. Flowchart

StartbestTotal = -1best = 0, i = 0i < 3 ?Yestotal = 0, j = 0j < 4 ?Yestotal = total +w[j] × s[i][j]j = j + 1NoOutput option[i],totaltotal >bestTotal ?YesbestTotal = totalbest = iNoi = i + 1NoOutput option[best]Stop
Flowchart for the weighted decision matrix. The inner loop adds up one option’s weighted scores; the decision keeps track of the best option so far.

Dry run using the worked example’s weights and scores:

i (option)total after inner looptotal > bestTotal?bestTotalbest
before loop––-10
0 (A)15 + 10 + 12 + 10 = 4747 > -1: Yes470
1 (B)6 + 4 + 16 + 25 = 5151 > 47: Yes511
2 (C)9 + 6 + 20 + 20 = 5555 > 51: Yes552

Why start bestTotal at -1? Every real total is 0 or more, so the first option is always bigger and becomes the first "best so far". Starting at a value that any real total beats is a standard trick for finding a maximum.

4. Program (C)

The weights are stored in a one-dimensional array and the scores in a two-dimensional array (one row per option). Do not worry if arrays are new: read the program alongside the pseudocode and you will see each line match up. You will study arrays properly later in the course.

#include <stdio.h>

#define NOPT 3
#define NCRIT 4

int main(void)
{
    const char *opt[NOPT] = {
        "A: Ticketing package",
        "B: Custom office app",
        "C: Web app with QR"};
    int w[NCRIT] = {3, 2, 4, 5};
    int s[NOPT][NCRIT] = {
        {5, 5, 3, 2},
        {2, 2, 4, 5},
        {3, 3, 5, 4}};
    int i, j, total;
    int best = 0, bestTotal = -1;

    for (i = 0; i < NOPT; i++) {
        total = 0;
        for (j = 0; j < NCRIT; j++)
            total = total + w[j] * s[i][j];
        printf("%-21s %3d\n",
               opt[i], total);
        if (total > bestTotal) {
            bestTotal = total;
            best = i;
        }
    }
    printf("Recommended: %s\n", opt[best]);
    return 0;
}

Output:

A: Ticketing package   47
B: Custom office app   51
C: Web app with QR     55
Recommended: C: Web app with QR

Try changing the weights to {5, 4, 2, 2} and running it again: option A should now be recommended with 55, exactly as in Try it 2. A program like this is a tool for the select stage; the judgement about the weights, and the written justification, are still your job.

Try it 4Stages and requirements practice

Pick a mode. Stage cards describe an activity from a different project; requirement cards ask you to classify a requirement. Tap New question for another.

Summary

StageRemember
Problem definitionA precise problem statement and scope; do not name a solution yet.
Problem analysisFact-finding (interviews, questionnaires, observation, documents); inputs, processing, outputs, storage; functional and non-functional requirements.
Identify and evaluateAt least two alternatives, each judged on cost, time, technical and operational feasibility, and how well it meets the requirements.
Select and justifyChoose the option that best fits this client (a weighted matrix helps) and give reasons linked to requirements.
Implementation and reviewDesign, code, test, install, train, change over; then check the solution against the original problem and loop back if needed.

Review questions

1. List the stages of the problem-solving process in order.

Show answer

Problem definition; problem analysis; identify and evaluate possible solutions; select and justify the optimal solution; implementation and review.

2. Why should a problem statement avoid naming a particular solution?

Show answer

Naming a solution too early stops you from considering alternatives. Stage 3 exists so that several solutions can be compared; the definition should describe the problem and what success looks like, not how to achieve it.

3. Distinguish between functional and non-functional requirements, giving ONE example of each for a school library system.

Show answer

A functional requirement states what the system must do, e.g. "the system must record the date a book is borrowed". A non-functional requirement states a quality or constraint, e.g. "a search must return results within 1 second" or "the system must run on the existing library computers".

4. Give TWO fact-finding methods and one advantage of each.

Show answer

Interviews: detailed answers and the chance to ask follow-up questions. Questionnaires: many people can be reached quickly and answers are easy to count. (Observation: shows what really happens. Document review: gives exact data formats and volumes.)

5. Why is it important to identify more than one possible solution?

Show answer

Comparing alternatives may reveal a cheaper, quicker or simpler solution, and it gives a basis for justifying the final choice. Without alternatives there is nothing to evaluate.

6. A weighted decision matrix gives Option X 62 and Option Y 58. Is this enough to justify choosing X? Explain.

Show answer

Not on its own. A justification should explain, in words, how X meets the key requirements and constraints better than Y (for example, it is within budget and meets the essential speed requirement), and why Y’s strengths matter less. The scores depend on the weights chosen, so the reasoning behind them must be shown.

7. State FOUR activities that take place during implementation.

Show answer

Any four of: coding; testing with normal, boundary and invalid data; installing hardware/software; converting or entering data; training users; writing documentation; changeover (direct, parallel, phased or pilot).

8. Why is the review stage needed, and what may happen as a result of it?

Show answer

To check whether the solution actually solves the defined problem and meets the requirements. It may lead to maintenance (fixing errors, adapting, improving) or, for larger issues, a return to analysis to start the cycle again.

Homework

  1. Your school canteen wants to reduce lunchtime queues. Write a problem statement (2-3 sentences) and state the scope.
  2. List FIVE functional and FIVE non-functional requirements for a canteen pre-ordering system. Label each non-functional requirement with its type (performance, security, usability, reliability, compatibility or constraint).
  3. Suggest THREE possible solutions (at least one without new software) and write one strength and one weakness for each.
  4. Build a weighted decision matrix for your three solutions with four criteria, and write a justification paragraph of about 80 words.
  5. Edit matrix.c so that it handles 4 options and 5 criteria, using your own matrix. What lines had to change?

Mastery quiz: The Stages of the Problem-Solving Process

This 10-question quiz is separate from the short Quick quiz at the end of the lesson. Score 8/10 or higher to earn this lesson’s badge. Your best score is saved in this browser on this device.

Mastery quiz: The Stages of the Problem-Solving Process

Your course badges: loading saved progress…

View badges

    No course badges earned yet. Score 8/10 in a lesson quiz to earn its badge.

    Saved in this browser on this device. Clearing browser data may remove your badges.

    Answer all 10 questions. Earn this lesson’s badge at 8/10 or higher. Read the explanations, revisit the Try it activities and retry as often as you need. These are self-study badges, not formal grades.

    1. Which stage comes first?
    2. Interviews, questionnaires and observation are used mainly in...
    3. "The system must print a receipt after each sale" is...
    4. "Pages must load in under 2 seconds" is...
    5. Which is NOT a non-functional requirement?
    6. The scope of a project states...
    7. Why identify several possible solutions?
    8. In a weighted decision matrix, an option’s total is found by...
    9. Running a new system on one route first, as a trial, is called...
    10. The review stage checks whether...

    Exam tips

    Specimen Unit 1 Paper 01 (2021), Item 21. A multiple-choice item about which activity belongs to the implementation stage. Remember the list: coding, testing, installing, data conversion, training, documentation and changeover all happen during implementation; fact-finding and requirements do not.

    CAPE 2024 Unit 1 Paper 02, Question 3(a). Stages of problem solving applied to a business scenario. Name each stage and say what would be done at that stage for the business in the question. A list of stage names alone usually earns only part of the marks. A worked answer is linked in the Go further box.

    CAPE 2009 Unit 1 Paper 02, Question 4(a). Identifying and evaluating possible solutions. Show that you know why alternatives are considered (comparison, justification, avoiding a poor first idea) and how they are evaluated (criteria such as cost, time, technical feasibility and fit with requirements).

    "Distinguish" questions on requirements. Give the definition of each type, then one example of each from the scenario in the question. Use the scenario’s own nouns (customers, tickets, bookings) to show you applied the idea.

    More worked answers are on the CS Solutions page.

    Previous: Module 2 • Lesson 02 – Top-Down, Bottom-Up, Stepwise Refinement and Hierarchy Charts. Next: Module 2 • Lesson 04 – Well-Designed Algorithms and Their Properties.

    Syllabus link: CAPE Computer Science (CXC A19/U2/21), Problem-Solving with Computers (Unit 1, Module 2). Specific Objective 3: explain the stages in the problem-solving process (problem definition; problem analysis, including functional and non-functional requirements; identify and evaluate possible solutions; select and justify the optimal solution; implementation and review).

    Video search terms

    Search YouTube for: "functional vs non-functional requirements examples", "weighted decision matrix explained", "system changeover direct parallel phased pilot", "problem solving process computer science".

    Try it 5Quick quiz

    Tap an answer. All eight questions are self-checks on this lesson.

    Updates

    2026/12/01

    - Updated the copyright line.

    - Published. Previous/Next links and the mastery quiz links now use the full lesson addresses.

    - Small script tidy-up for the site (no change to how the activities work).

    - Fixed an activity script that the site changed when the lesson was first published.

    2026/11/24

    - Linked Previous/Next and the mastery quiz URLs to draft shortlinks (?p=ID), which will redirect to the permalink after publish.

    - First version of the lesson.

    © 2026 islandclass.org

    Leave a Reply