Introduction
This question tested the following topics/items:
- Stages in the problem-solving process (applied to a software project)
- Properties of well-defined algorithms
- Representing an algorithm using a flowchart
- Selection (nested/multiple IF) to apply rates to a range of values
Part a)
Any two of the following stages (definition + what it involves for TechWorld):
Problem definition – The software company states precisely and concisely what the software must do, i.e. move TechWorld from its current way of working to the desired state. For example: the software must track purchases, the quantity of laptops and tablets in stock, and customer information.
Problem analysis – The company determines all the details needed to solve the problem: the inputs (e.g. purchase details, item details, customer details), the processing (e.g. update the stock quantity when a laptop or tablet is sold) and the outputs (e.g. stock reports, customer lists). Functional and non-functional requirements are gathered, e.g. by interviewing TechWorld’s staff.
Identify and evaluate possible solutions – Several possible solutions are generated (e.g. an off-the-shelf package, a custom desktop application or a web-based system), and the strengths and weaknesses of each are compared.
Select and justify the optimal solution – The best solution is chosen based on criteria such as cost, speed, storage and how well it meets TechWorld’s requirements. A detailed algorithm of the chosen solution is produced.
Implementation and review – The solution is coded, tested and installed at TechWorld. It is then reviewed using feedback from the users to make sure it solves the original problem, and it is maintained afterwards.
See this note: Stages in problem solving
Part b) i)
Any two:
- It has a finite number of steps (it must terminate).
- The steps are clearly defined, precise and unambiguous.
- It shows the flow of control from one process to another.
- It is a general solution to the problem (it works for all valid inputs).
See this note: Algorithms, WHAT IS AN ALGORITHM? – DEFINITION
Part b) ii)
Suggested response:
+-----------+
| START |
+-----------+
|
v
/---------------/
/ READ gb /
/---------------/
|
v
/---------\
< gb < 1 ? >----Yes--->[ cost = gb * 4.00 ]-----+
\---------/ |
| No |
v |
/---------\ |
< gb <= 2 ? >----Yes--->[ cost = gb * 3.00 ]-----+
\---------/ |
| No |
v |
[ cost = gb * 2.50 ] |
| |
+<-----------------------------------------+
|
v
/---------------/
/ PRINT cost /
/---------------/
|
v
+-----------+
| STOP |
+-----------+
Flowchart symbols: START/STOP – terminal (oval); READ/PRINT – input/output (parallelogram); cost = … – process (rectangle); gb < 1 ? – decision (diamond).
Further explanation
The same algorithm in pseudocode:
START
READ gb
IF gb < 1 THEN
cost <-- gb * 4.00
ELSE
IF gb <= 2 THEN
cost <-- gb * 3.00
ELSE
cost <-- gb * 2.50
ENDIF
ENDIF
PRINT cost
STOP
Testing the algorithm:
| gb | Rate applied | cost |
|---|---|---|
| 0 | gb < 1 | 0 x 4.00 = $0.00 |
| 1 | 1 ≤ gb ≤ 2 | 1 x 3.00 = $3.00 |
| 2 | 1 ≤ gb ≤ 2 | 2 x 3.00 = $6.00 |
| 5 | gb > 2 | 5 x 2.50 = $12.50 |
Note: “Between 1 and 2 gigabytes” is taken to include 1 and 2. The rate is applied to all gigabytes used (not in tiers).
See this note: Flowcharts – Representation, Using multiple selection statements (By Example)
Links to Notes
© 2026 Vedesh Kungebeharry. All rights reserved.
