A pencil-and-paper workbook: practise the exam question types, revise the theory in full sentences, and plan your last weeks.
A recursive method solves a problem by handing a slightly smaller copy of the same problem to itself. In this unit you will watch the calls pile up on paper, follow the answers back, and write recursive methods of your own.
function SumTo(n: Integer): Integer;
begin
if n = 0 then
Result := 0 // base case: no further call
else
Result := n + SumTo(n - 1); // recursive case: smaller problem
end;procedure Climb(n: Integer);
begin
if n > 0 then
begin
memOut.Lines.Add('up ' + IntToStr(n)); // BEFORE the call
Climb(n - 1);
end;
end; // Climb(3): up 3, up 2, up 1
procedure Fall(n: Integer);
begin
if n > 0 then
begin
Fall(n - 1);
memOut.Lines.Add('down ' + IntToStr(n)); // AFTER the call
end;
end; // Fall(3): down 1, down 2, down 3Work down the rows to find the base case, then fill in the value returned, starting at the bottom row and working up.
function SumTo(n: Integer): Integer;
begin
if n = 0 then
Result := 0
else
Result := n + SumTo(n - 1);
end;
iAns := SumTo(5);| Call | n | Base case? (Yes/No) | Value returned |
|---|---|---|---|
| SumTo(5) | 5 | ||
| SumTo(4) | 4 | ||
| SumTo(3) | 3 | ||
| SumTo(2) | 2 | ||
| SumTo(1) | 1 | ||
| SumTo(0) | 0 |
This function makes two recursive calls. Draw a tree of every call to Fib(4): write the call in a circle and join it to the two calls it makes. Write the value in each circle, then say how many calls were made altogether.
function Fib(n: Integer): Integer;
begin
if n <= 1 then
Result := n
else
Result := Fib(n - 1) + Fib(n - 2);
end;Triple(n) should return 3 × n by adding 3 repeatedly, so Triple(4) = 12. Instead the program crashes. Find two errors, say what happens when Triple(4) is called, and write the corrected line(s).
function Triple(n: Integer): Integer;
begin
if n = 0 then
Result := 0
else
Result := 3 + Triple(n + 1);
end;Write two recursive functions. (a) Multiply(a, b: Integer): Integer multiplies two whole numbers using only addition (b is never negative): Multiply(7, 4) = 7 + 7 + 7 + 7 = 28. (b) CountChar(sText: string; cFind: Char): Integer returns how many times cFind appears in sText; pass on Copy(sText, 2, Length(sText) - 1) so that the text gets shorter. CountChar('banana', 'a') = 3.
The first question in Paper 1 mixes strings, loops and decisions in one short story. Marks come from careful reading, a tidy plan and tracing your own code. This unit gives you four types of practice: trace, predict, debug and write.
Put a pencil on box 1 and walk along the letters as a loop would. (a) How many vowels are there? (b) At which position is the space? (c) What would Copy(sText, 6, 3) give? (d) Write the string backwards.
| Age | 12 | 13 | 17 | 18 | 59 | 60 | 75 |
|---|---|---|---|---|---|---|---|
| Fee (R) |
| Pattern | How it works |
|---|---|
| Walk a string | for i := 1 to Length(s) do and look at s[i]. The first character is at position 1. |
| Take it apart | Pos(sub, s) gives the position of the first match, or 0 if there is none. Copy(s, start, count) returns text; Delete(s, start, count) removes it from s itself (a procedure, not a function). |
| Characters and codes | Ord('A') = 65, Chr(66) = 'B'; a lower-case letter is 32 more than its capital. UpperCase and LowerCase change a whole string, UpCase a single character. |
| Counter and total | Set to 0 before the loop. Inc(iCount) when the condition is true; add to the total on every pass. |
| Highest or lowest | Start the highest at a value no mark can be below (or at the first value) and replace it whenever something larger is found. |
| Reading until a sentinel | Read once before a WHILE loop and read again as the last line inside it, otherwise the loop never ends. |
| Decisions | Test the most specific rule first in an else-if ladder, put brackets round every comparison joined by and/or, and use case for whole-number ranges such as 80..100. |
| Safe division | Test that the counter is more than 0 before dividing by it. |
The text is 'load shedding is back' (words separated by one space). Complete a row for every check of the WHILE condition; the last two rows show where the loop ends and the final Inc.
sText := 'load shedding is back';
iWords := 0;
while Pos(' ', sText) > 0 do
begin
iPos := Pos(' ', sText);
sWord := Copy(sText, 1, iPos - 1);
Delete(sText, 1, iPos);
Inc(iWords);
end;
Inc(iWords);| Check | iPos (0 if none) | sWord | sText after the body | iWords |
|---|---|---|---|---|
| 1 | ||||
| 2 | ||||
| 3 | ||||
| 4 | ||||
| after the loop: Inc(iWords) |
This code should show what percentage of the characters in edtText are vowels (capital or small). Find four errors.
sText := edtText.Text;
iVowels := 0;
for i := 0 to Length(sText) do
if sText[i] in ['a', 'e', 'i', 'o', 'u'] then
Inc(iVowels);
rPerc := iVowels / Length(sText) * 100;
lblOut.Caption := rPerc + '%';A new learner's full name, such as Zola Ndlovu, is in edtName. Build the e-mail address from the first letter of the first name, the surname and @bhs.edu.za, all in small letters, and show it in lblEmail. (Zola Ndlovu gives zndlovu@bhs.edu.za.) If there is no space in the name, show a message instead.
Use an InputBox in a loop to read marks until the user types -1. A mark outside 0 to 100 must give a message and must not be counted. At the end show in lblOut how many valid marks were entered, how many were 80 or more, and the highest mark. If no valid mark was entered, show No marks.
Question 2 of Paper 1 nearly always reads a text file into arrays, then asks for a report, a search or a sort. The steps never change, so practise them until they feel automatic.
| Position in list | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| Name | Thandi | Pieter | Ayesha | Sipho | Lize | Kabelo |
| Time (s) | 1425 | 1310 | 1688 | 1502 | 1397 | 1735 |
Thandi Nkosi,F,1425 Pieter Visser,M,1310 Ayesha Cassiem,F,1688 Sipho Zulu,M,1502 Lize Botha,F,1397 Kabelo Molefe,M,1735 Nomsa Dube,F,1520 Riaan Pretorius,M,1290
var
arrName : array[1..100] of string;
arrGender : array[1..100] of string;
arrTime : array[1..100] of Integer;
iCount : Integer;
AssignFile(tFile, 'Parkrun.txt');
Reset(tFile);
while not EOF(tFile) do
begin
ReadLn(tFile, sLine);
Inc(iCount);
iPos := Pos(',', sLine);
arrName[iCount] := Copy(sLine, 1, iPos - 1);
Delete(sLine, 1, iPos);
iPos := Pos(',', sLine);
arrGender[iCount] := Copy(sLine, 1, iPos - 1);
arrTime[iCount] := StrToInt(Copy(sLine, iPos + 1, Length(sLine)));
end;
CloseFile(tFile);bFound := False;
i := 1;
while (i <= iCount) and (not bFound) do
if arrName[i] = sFind then
bFound := True
else
Inc(i);
// bFound False means not found; otherwise i is the position
// bubble sort, smallest time first, names move with the times
for i := 1 to iCount - 1 do
for j := 1 to iCount - i do
if arrTime[j] > arrTime[j + 1] then
begin
iTemp := arrTime[j]; arrTime[j] := arrTime[j + 1]; arrTime[j + 1] := iTemp;
sTemp := arrName[j]; arrName[j] := arrName[j + 1]; arrName[j + 1] := sTemp;
end;
function MinSec(iTime: Integer): string;
var
iSec: Integer;
begin
iSec := iTime mod 60;
Result := IntToStr(iTime div 60) + ':';
if iSec < 10 then
Result := Result + '0';
Result := Result + IntToStr(iSec);
end;Parkrun.txt is printed in Question 2 in four steps. Trace the loop for the first three lines: Thandi Nkosi,F,1425; Pieter Visser,M,1310; Ayesha Cassiem,F,1688. Write the values after each pass. The row for check 4 shows the loop ending.
iTotal := 0; iFem := 0;
AssignFile(tFile, 'Parkrun.txt');
Reset(tFile);
while not EOF(tFile) do
begin
ReadLn(tFile, sLine);
iPos := Pos(',', sLine);
sName := Copy(sLine, 1, iPos - 1);
Delete(sLine, 1, iPos);
iPos := Pos(',', sLine);
sGender := Copy(sLine, 1, iPos - 1);
iTime := StrToInt(Copy(sLine, iPos + 1, Length(sLine)));
iTotal := iTotal + iTime;
if sGender = 'F' then
Inc(iFem);
end;
// (the file has only these three lines in this question)| Check | EOF(tFile)? | sName | sGender | iTime | iTotal | iFem |
|---|---|---|---|---|---|---|
| 1 | False | |||||
| 2 | False | |||||
| 3 | False | |||||
| 4 | True |
arrName holds Sipho, Riaan, Ayesha, Lize, Pieter and arrTime holds 1502, 1290, 1688, 1397, 1310. Write both arrays after each pass of the bubble sort in Learn It (smallest time first) and the number of swaps.
for i := 1 to 4 do
for j := 1 to 5 - i do
if arrTime[j] > arrTime[j + 1] then
begin
// swap arrTime[j] with arrTime[j + 1]
// swap arrName[j] with arrName[j + 1]
end;| Pass (i) | arrTime after the pass | arrName after the pass | Swaps |
|---|---|---|---|
| 1 | |||
| 2 | |||
| 3 | |||
| 4 |
Write the code that reads Parkrun.txt into the arrays declared in Learn It and counts the runners in iCount. Test that the file exists first and show a message if it does not. (tFile, sLine and iPos are declared; the first line of the file is a runner, not a heading.)
The arrays are filled and iCount holds the number of runners. Show the fastest runner's name and time (as m:ss) in lblFast, how many runners finished in under 25 minutes (1 500 seconds) in lblUnder, and the average time (as m:ss, whole seconds) in lblAvg. Use the function MinSec.
Question 3 gives you a short story and asks for a class: attributes, a constructor, accessors, mutators, auxiliary methods and a ToString, then code in the form that uses the objects. Learn the pattern once and it will repeat in every paper.
unit UParcel;
interface
type
TParcel = class
private
fID : string;
fWeight : Real;
fZone : Integer; // 1, 2 or 3
fInsured : Boolean;
function BaseRate : Real; // auxiliary: used only inside the class
public
constructor Create(sID: string; rWeight: Real; iZone: Integer);
function GetWeight : Real;
function GetZone : Integer;
procedure SetZone(iNew: Integer);
procedure SetWeight(rNew: Real);
procedure SetInsured(bNew: Boolean);
function CalcCost : Real;
function ToString : string;
end;implementation
constructor TParcel.Create(sID: string; rWeight: Real; iZone: Integer);
begin
fID := sID;
fWeight := rWeight;
fZone := iZone;
fInsured := False; // a default, not a parameter
end;
procedure TParcel.SetZone(iNew: Integer);
begin
if (iNew >= 1) and (iNew <= 3) then
fZone := iNew; // the mutator protects the attribute
end;function TParcel.BaseRate : Real;
begin
case fZone of
1: Result := 35;
2: Result := 55;
else
Result := 80;
end;
end;
function TParcel.CalcCost : Real;
begin
Result := BaseRate; // the auxiliary method gives the zone rate
if fWeight > 2 then
Result := Result + (fWeight - 2) * 12.5; // R12.50 for every kg over 2
if fInsured then
Result := Result + 15;
end;
function TParcel.ToString : string;
begin
Result := fID + ': ' + FloatToStrF(fWeight, ffFixed, 6, 1) + 'kg, zone ' + IntToStr(fZone)
+ ', R' + FloatToStrF(CalcCost, ffFixed, 8, 2);
end;function TRoute.TotalCost : Real;
var
i : Integer;
begin
Result := 0;
for i := 1 to fCount do
Result := Result + arrParcel[i].CalcCost; // each object answers for itself
end;Complete the table after each statement. The class is TParcel above: SetZone accepts only 1 to 3, SetWeight only a weight above 0. CalcCost is the price the method gives at that moment, to 2 decimal places.
objP := TParcel.Create('PX7', 3.5, 2);
objP.SetInsured(True);
objP.SetZone(3);
objP.SetZone(5);
objP.SetWeight(1.5);
objP.SetWeight(-2);| After this statement | fWeight | fZone | fInsured | CalcCost (R) |
|---|---|---|---|---|
| objP := TParcel.Create('PX7', 3.5, 2); | ||||
| objP.SetInsured(True); | ||||
| objP.SetZone(3); | ||||
| objP.SetZone(5); | ||||
| objP.SetWeight(1.5); | ||||
| objP.SetWeight(-2); |
Write the three lines that are added to memOut. (Use the TParcel class above: each ToString shows ID, weight, zone and cost.)
objA := TParcel.Create('A1', 1.0, 1);
objB := TParcel.Create('B2', 4.0, 3);
objC := objB;
objC.SetZone(1);
objA.SetInsured(True);
memOut.Lines.Add(objA.ToString);
memOut.Lines.Add(objB.ToString);
memOut.Lines.Add(objC.ToString);A spaza shop keeps one TItem object for each product. The interface is below; GetQty, Restock, SetPrice and the private StockValue (price × quantity) are already written. Write the implementation of: the constructor (sets the name and price and starts the quantity at 0); Sell, which reduces the quantity and returns True only if there is enough stock (otherwise nothing changes and it returns False); and ToString, which uses StockValue to give text such as Maize meal: 6 @ R42.50 (value R255.00).
type
TItem = class
private
fName : string;
fPrice : Real;
fQty : Integer;
function StockValue : Real;
public
constructor Create(sName: string; rPrice: Real);
function GetQty : Integer;
procedure SetPrice(rNew: Real);
procedure Restock(iAdd: Integer);
function Sell(iHowMany: Integer) : Boolean;
function ToString : string;
end;Objects are made in the form. objItem is declared at form level as TItem. (a) In btnNew: create the object from edtName and edtPrice (a decimal number), freeing any old object first. (b) In btnSell: call Sell with the value of sedQty; show Not enough stock in lblMsg if it returns False, otherwise show the item's ToString in lblMsg.
A 2D array is a table in memory: the first index chooses the row and the second chooses the column. Exam questions on grids all come down to three skills: knowing which index to fix, writing nested loops in the right order, and checking the edges of the grid.
| c = 1 | c = 2 | c = 3 | c = 4 | c = 5 | c = 6 | c = 7 | c = 8 | |
|---|---|---|---|---|---|---|---|---|
| r = 1 | X | X | O | O | X | X | X | O |
| r = 2 | O | X | O | X | O | O | X | O |
| r = 3 | X | O | X | X | O | X | O | O |
| r = 4 | X | O | O | O | O | X | O | X |
| r = 5 | X | X | X | O | O | O | X | O |
| Learner | Test 1 | Test 2 | Test 3 | Test 4 |
|---|---|---|---|---|
| Amahle | 62 | 70 | 58 | 74 |
| Brandon | 45 | 52 | 60 | 48 |
| Chantelle | 81 | 77 | 90 | 85 |
| Dumisa | 55 | 63 | 49 | 58 |
| Elmarie | 70 | 66 | 72 | 68 |
var
arrMark : array[1..5, 1..4] of Integer; // 5 learners, 4 tests
arrName : array[1..5] of string;
// row total for every learner
for r := 1 to 5 do
begin
iRowTotal := 0; // reset for each row
for c := 1 to 4 do
iRowTotal := iRowTotal + arrMark[r, c];
memOut.Lines.Add(arrName[r] + ': ' + IntToStr(iRowTotal));
end;
// column total for test 3
iColTotal := 0;
for r := 1 to 5 do
iColTotal := iColTotal + arrMark[r, 3];The marks table is the one in Think First (Amahle 62, 70, 58, 74; Brandon 45, 52, 60, 48; Chantelle 81, 77, 90, 85; Dumisa 55, 63, 49, 58; Elmarie 70, 66, 72, 68). Write the values after each pass of the outer loop.
iBest := 1;
iBestTotal := 0;
for r := 1 to 5 do
begin
iRowTotal := 0;
for c := 1 to 4 do
iRowTotal := iRowTotal + arrMark[r, c];
if iRowTotal > iBestTotal then
begin
iBestTotal := iRowTotal;
iBest := r;
end;
end;| r | iRowTotal | iBestTotal | iBest |
|---|---|---|---|
| 1 | |||
| 2 | |||
| 3 | |||
| 4 | |||
| 5 |
This code should show each learner's average over the four tests (to 1 decimal) in memOut. Find four errors.
iTotal := 0;
for r := 1 to 5 do
begin
for c := 1 to 4 do
iTotal := iTotal + arrMark[c, r];
rAvg := iTotal / 5;
memOut.Lines.Add(arrName[r] + ' ' + rAvg);
end;A family needs three free seats side by side in one row. Search the seat plan row by row and show in lblFind the row and the first column of the first such group (for example Row 4, seat 2), or None free.
Use arrMark[1..5, 1..4] and arrName[1..5] (the marks table in Think First). (a) Show every learner's name and average (one decimal) in memOut. (b) Find the test with the highest class average and show Test 4 (its number) in lblBest.
Question 4 gives you a small extract of a database and asks you to read, write and build queries. The marks come from three habits: running the query by hand in the right order, joining tables with a condition, and writing the SQL inside Delphi correctly.
| BranchID | BranchName | Town |
|---|---|---|
| 1 | Main Street | Bellville |
| 2 | Station Road | Parow |
| 3 | Vineyard Lane | Durbanville |
| 4 | Hilltop | Goodwood |
| OrderID | BranchID | OrderDate | Product | Qty | UnitPrice |
|---|---|---|---|---|---|
| 1 | 1 | 2026/08/03 | Bread | 40 | 18 |
| 2 | 2 | 2026/08/03 | Rusks | 12 | 45 |
| 3 | 1 | 2026/08/05 | Milk tart | 6 | 60 |
| 4 | 3 | 2026/08/07 | Bread | 25 | 18 |
| 5 | 4 | 2026/08/10 | Koeksister | 48 | 4.5 |
| 6 | 2 | 2026/08/12 | Bread | 31 | 18 |
| 7 | 3 | 2026/08/14 | Milk tart | 4 | 60 |
| 8 | 1 | 2026/09/02 | Rusks | 20 | 45 |
| 9 | 4 | 2026/09/04 | Bread | 22 | 18 |
| 10 | 2 | 2026/09/09 | Koeksister | 36 | 4.5 |
| 11 | 3 | 2026/09/11 | Rusks | 15 | 45 |
| 12 | 1 | 2026/09/15 | Milk tart | 8 | 60 |
SELECT B.BranchName, SUM(O.Qty * O.UnitPrice) AS Revenue FROM tblBranch B, tblOrder O WHERE B.BranchID = O.BranchID AND O.OrderDate >= #2026/09/01# GROUP BY B.BranchName HAVING SUM(O.Qty * O.UnitPrice) > 500 ORDER BY Revenue DESC;
qryOrder.Close;
qryOrder.SQL.Clear;
qryOrder.SQL.Add('SELECT B.Town, SUM(O.Qty * O.UnitPrice) AS Revenue');
qryOrder.SQL.Add('FROM tblBranch B, tblOrder O');
qryOrder.SQL.Add('WHERE B.BranchID = O.BranchID');
qryOrder.SQL.Add('AND O.Product = "' + edtProduct.Text + '"'); // a text value goes in quotes
qryOrder.SQL.Add('GROUP BY B.Town');
qryOrder.Open; // SELECT: Open
qryOrder.Close;
qryOrder.SQL.Text := 'UPDATE tblOrder SET UnitPrice = UnitPrice * 1.05 WHERE Product = "Bread"';
qryOrder.ExecSQL; // INSERT, UPDATE, DELETE: ExecSQL
qryOrder.First; // reading the answer, record by record
while not qryOrder.Eof do
begin
memOut.Lines.Add(qryOrder['Town'] + ': R' + FloatToStrF(qryOrder['Revenue'], ffFixed, 8, 2));
qryOrder.Next;
end;Use tblOrder in Think First. Write the result of this query, in the order the query gives it:
SELECT TOP 3 OrderID, Product, Qty * UnitPrice AS Total FROM tblOrder WHERE Qty >= 20 ORDER BY Total DESC;
| OrderID | Product | Total |
|---|---|---|
Step 1: for each branch count its orders and add up the order values (Qty × UnitPrice). Step 2: keep only revenue above 1000 and write the final order.
SELECT B.BranchName, COUNT(O.OrderID) AS Orders, SUM(O.Qty * O.UnitPrice) AS Revenue FROM tblBranch B, tblOrder O WHERE B.BranchID = O.BranchID GROUP BY B.BranchName HAVING SUM(O.Qty * O.UnitPrice) > 1000 ORDER BY SUM(O.Qty * O.UnitPrice) DESC;
| BranchName | Orders | Revenue (R) | Kept? | Final position |
|---|---|---|---|---|
| Hilltop | ||||
| Main Street | ||||
| Station Road | ||||
| Vineyard Lane |
This query should show each branch name with its revenue, only for branches whose revenue is above R1000, highest revenue first. Find five errors and write the corrected query.
SELECT B.BranchName, SUM(O.Qty * O.UnitPrice) AS Revenue FROM tblBranch B, tblOrder O WHERE SUM(O.Qty) > 50 GROUP BY B.Town HAVING Revenue > 1000 ORDER BY BranchName DESC;
Write two queries. (a) Show, under the heading AugOrders, how many orders were placed in August 2026; use a date range that works for every moment of the month. (b) Show each Town with the average order quantity of its orders, rounded to 1 decimal and headed AvgQty, only for towns whose average is above 25.
Write three separate statements: (a) add order 13 for branch 2 on 18 September 2026: 24 Scones at R12.50; (b) increase the UnitPrice of every Bread order from 1 September 2026 onwards by R1.50; (c) delete order 7.
qryOrder is a TADOQuery. Write the code that runs a query to find the revenue of each town (Qty × UnitPrice summed, using the join of tblBranch and tblOrder, in alphabetical order of town), adds a line such as Bellville: R2460.00 to memOut for each town, and shows the name of the town with the highest revenue in lblTop.
Paper 2 tests Grades 10 to 12 together. This unit revises this term's theory: search and the web, networks and internet connections, sharing and remote access, security, and how computers affect society. Every written answer here is a sentence or a short paragraph.
| Technology | Runs where | Job |
|---|---|---|
| HTML | Browser | The content and structure of the page |
| CSS | Browser | The appearance: colours, fonts and layout |
| JavaScript | Browser (client-side) | Checks a form or changes the page at once, without asking the server |
| AJAX | Browser asks server | Fetches data in the background so only part of the page updates |
| PHP | Web server (server-side) | Processes forms and talks to the database |
| XML | Either | A text format for storing and exchanging structured data between systems |
| Cookie | Stored on the device | A small text file that lets a site remember you, such as a login or basket |
| Connection | Strength | Weakness |
|---|---|---|
| Fibre | Fastest, most stable, low delay | Needs a cable to the building; not everywhere |
| Wi-Fi | Cable-free access inside a building (the last step, not an ISP service) | Short range; shared and easier to attack |
| 4G / 5G | Wide coverage; 5G has very low delay and handles many devices | Data is expensive and capped; signal varies |
| Satellite | Works almost anywhere, even without cables or towers | High delay, usually costly, weather can affect it |
Shared folders carry user rights (no access, read-only, read/write, full control). Give each person the lowest right that lets them do their job, so a mistake or virus on one account cannot damage everything. BitTorrent is peer-to-peer sharing: a file is cut into pieces that are downloaded from many peers at once while you upload pieces to others. It spreads large legal files cheaply, but it is often used for piracy and your IP address is visible to the other peers. Remote access means using a computer or network from another place: over a LAN, over the Internet, or through a VPN, which adds an encrypted tunnel across the public Internet so that someone at home or in a coffee shop can use the company network safely.
Grade 11 review. Symmetric encryption uses one shared key, asymmetric encryption uses a pair of keys. A blockchain is a chain of blocks of records, each storing a fingerprint (hash) of the block before, copied over many computers, so changing an old record breaks the chain and is noticed. MFA needs two or more different kinds of proof (something you know, have or are), so a stolen password alone is not enough.
Write the term from the word bank next to each description.
Word bank: AJAX · cookie · digital certificate · distributed computing · firewall · mediated search · semantic search · switch · VPN · wireless access point
| Description | Term |
|---|---|
| Works out the meaning and intention behind the words of a search | |
| A search through a person or system that looks only in a chosen collection, such as Google Scholar | |
| A small text file that a website stores on your device to remember you | |
| Updates part of a web page without reloading the whole page | |
| Sends data only to the intended device inside one LAN | |
| Lets wireless devices join a wired network | |
| An encrypted tunnel across the Internet to a private network | |
| Proof signed by a trusted authority that a website is genuine | |
| Filters network traffic according to rules | |
| Splits one huge job into pieces that many computers solve at the same time |
A clinic has 8 PCs in two rooms, a server, a printer and nurses who walk around with tablets. It has a fibre line from its ISP. Draw a network diagram that includes every device above plus the devices that connect them. Label every device and say where the firewall belongs.
Discuss one benefit and one risk of social networking, and explain how cookies can reduce a user's privacy.
A game farm in the Karoo has no fibre and no cell-phone tower in range. The owner wants to run a booking website's back-end from the farm office. Recommend a connection and motivate your choice, and give one disadvantage of it. Answer in sentences.
A bookkeeper works from home and opens files on her company's server. Explain how a VPN protects the data, and give one remaining risk of remote access.
Explain how SSL/TLS, public and private keys and a digital certificate keep a parent's card number safe when paying school fees online.
A school shares a Marks folder on its server. Explain why teachers should get read/write rights but learners no access, and explain one risk if a learner uses BitTorrent on the school network.
Marks are lost in the exam room for avoidable reasons: a command word is ignored, a mark allocation is not counted, or time runs out. This unit trains the habits that protect marks and helps you plan the last weeks.
| Question | Command word | Points needed | What I will write |
|---|---|---|---|
| Name TWO advantages of fibre over a 4G connection. [2] | |||
| Explain how a firewall protects a school network. [3] | |||
| Differentiate between a switch and a router. [4] | |||
| Discuss the effects of social networking on privacy. [4] |
| Command word | What to do |
|---|---|
| Name / State / List | Give the answer only: a word or short phrase for each mark. |
| Explain | Say what and why or how: a point and its reason for each mark. |
| Discuss | Give both sides, benefits and drawbacks, and explain each, in a paragraph. |
| Differentiate | Show how two things differ, mentioning both things in every comparison. |
| Motivate / Justify | Choose, then give explained reasons; the word because must appear. |
| Calculate | Formula, working and answer with its unit. |
A petrol station gives a loyalty-card discount of R0.50 per litre when the card box chkCard is ticked and the customer buys 20 litres or more. The litres are in edtLitres and the price per litre in edtPrice (both decimal numbers). Show the total in lblTotal, or a message if the litres are not more than 0. (a) Write your plan as comments. (b) Write the code under your comments.
Plan a week that you can really keep. Write the time, the topic and the task (for example trace three recursion functions, one SQL past-paper question, write a theory answer as a paragraph). Plan at least two Paper 2 sessions and two Paper 1 sessions, and one rest period.
| Day | Time | Topic | Task I will do |
|---|---|---|---|
| Monday | |||
| Tuesday | |||
| Wednesday | |||
| Thursday | |||
| Friday | |||
| Saturday | |||
| Sunday |
No notes, no computer. Show all your working. Write Delphi code neatly and use correct indentation.
Trace Mix(6, 13). Work down to the base case, then fill in the branch and the value returned, from the bottom row up.
function Mix(a, b: Integer): Integer;
begin
if b = 0 then
Result := 0
else if b mod 2 = 0 then
Result := Mix(a * 2, b div 2)
else
Result := a + Mix(a * 2, b div 2);
end;| Call | a | b | Branch (odd / even / base case) | Value returned |
|---|---|---|---|---|
| Mix(6, 13) | 6 | 13 | ||
| Mix(12, 6) | 12 | 6 | ||
| Mix(24, 3) | 24 | 3 | ||
| Mix(48, 1) | 48 | 1 | ||
| Mix(96, 0) | 96 | 0 |
Write a recursive function SumEven(n: Integer): Integer that returns the sum of all the even numbers from 2 up to n (n is not negative). For example SumEven(7) = 2 + 4 + 6 = 12, and SumEven(1) = 0.
Trace this code and write the values after each pass. Then write the final values of iSum and sLetters.
sCode := 'RC-4172-X';
iSum := 0;
sLetters := '';
for i := 1 to Length(sCode) do
if sCode[i] in ['0'..'9'] then
iSum := iSum + StrToInt(sCode[i])
else if sCode[i] <> '-' then
sLetters := sCode[i] + sLetters;| i | sCode[i] | iSum | sLetters |
|---|---|---|---|
| 1 | R | ||
| 2 | C | ||
| 3 | - | ||
| 4 | 4 | ||
| 5 | 1 | ||
| 6 | 7 | ||
| 7 | 2 | ||
| 8 | - | ||
| 9 | X |
This code should convert a mark into a symbol: 80 or more is A, 70 to 79 B, 60 to 69 C, 50 to 59 D and below 50 F. Find and correct four errors.
iMark := edtMark.Text; if iMark >= 80 then sSym := 'A'; else if iMark >= 60 then sSym := 'B' else if iMark >= 50 sSym := 'C' else sSym := 'F'; lblSym.Caption := sSym;
arrFare holds 46, 28, 35, 19, 31. Write the array after each pass and the number of swaps in that pass.
for i := 1 to 4 do
for j := 1 to 5 - i do
if arrFare[j] > arrFare[j + 1] then
begin
iTemp := arrFare[j];
arrFare[j] := arrFare[j + 1];
arrFare[j + 1] := iTemp;
end;| Pass (i) | Array after the pass | Swaps |
|---|---|---|
| 1 | ||
| 2 | ||
| 3 | ||
| 4 |
Donations.txt has one line per donor in the form Zinhle,250 (the amount is in rand). Write the code that reads the file into arrDonor and arrAmount (array[1..100]) and counts the donors in iCount. (File variable tIn; sLine and iPos are declared.)
The arrays are now filled. Show the total of all donations in lblTotal and the name of the biggest donor in lblTop. In the same loop write every donor who gave R500 or more to a new file Big.txt, in the form Aisha: R1200. (File variable tOut.)
A gym keeps one TMember object per member. Write the type section of the class with these private attributes: fName (string), fMonths (Integer) and fPlan (Char, 'B' basic or 'P' premium); and these public methods: a constructor Create(sName: string; cPlan: Char); an accessor GetName; a mutator AddMonths(iNum: Integer); TotalPaid (Real); and ToString. Add a private auxiliary function MonthlyFee (Real).
Write the implementation of: the constructor (months start at 0); AddMonths (only add if iNum is more than 0); and the auxiliary MonthlyFee (R420 for 'P', otherwise R250).
Write the implementation of TotalPaid (months × monthly fee) and ToString, which gives text such as Lindiwe (P): 3 months, R1260.00.
The rainfall (mm) for 4 weeks of 7 days is stored in arrRain[1..4, 1..7] (row = week, column = day):
| Day 1 | Day 2 | Day 3 | Day 4 | Day 5 | Day 6 | Day 7 | |
|---|---|---|---|---|---|---|---|
| Week 1 | 0 | 3 | 12 | 0 | 0 | 8 | 15 |
| Week 2 | 5 | 0 | 0 | 22 | 10 | 0 | 0 |
| Week 3 | 0 | 0 | 7 | 18 | 25 | 3 | 0 |
| Week 4 | 11 | 0 | 0 | 6 | 0 | 14 | 9 |
A nursery keeps its plants in two tables:
| SupplierID | SupplierName | Town |
|---|---|---|
| 1 | Green Fingers | Paarl |
| 2 | Karoo Blooms | Worcester |
| 3 | Fynbos Direct | Stellenbosch |
| PlantID | SupplierID | PlantName | Stock | Price | DateAdded |
|---|---|---|---|---|---|
| 1 | 1 | Protea | 24 | 45.00 | 2026/06/10 |
| 2 | 2 | Aloe | 60 | 25.00 | 2026/07/02 |
| 3 | 1 | Fynbos mix | 15 | 80.00 | 2026/07/15 |
| 4 | 3 | Lavender | 40 | 30.00 | 2026/07/20 |
| 5 | 2 | Agapanthus | 35 | 22.50 | 2026/08/04 |
| 6 | 3 | Protea | 12 | 48.00 | 2026/08/11 |
| 7 | 1 | Aloe | 28 | 27.50 | 2026/08/19 |
| 8 | 2 | Lavender | 17 | 32.00 | 2026/09/01 |
SELECT PlantName, Stock * Price AS StockValue FROM tblPlant WHERE Price > 30 ORDER BY StockValue DESC;
| PlantName | StockValue |
|---|---|
Write the result of this query (use both tables):
SELECT S.Town, COUNT(P.PlantID) AS Plants, SUM(P.Stock) AS TotalStock FROM tblSupplier S, tblPlant P WHERE S.SupplierID = P.SupplierID GROUP BY S.Town HAVING SUM(P.Stock) > 60 ORDER BY SUM(P.Stock) DESC;
| Town | Plants | TotalStock |
|---|---|---|
Write a query that shows the supplier name and plant name of every plant added after 1 August 2026.
Write three statements: (a) add a plant for supplier 2 named Geranium, stock 30, price R18.50; (b) increase the price of every plant from supplier 1 by 10%; (c) delete every plant with a stock below 15.
The user sets sedMin to a minimum stock level. qryPlant is a TADOQuery. Write the code that lists the PlantName and Stock of every plant with at least that stock, in alphabetical order of name, adds a line such as Aloe (60) to memOut for each, and shows how many plants were listed in lblCount.
Answer in full sentences or short paragraphs, never bullet points. One-word answers are only for the matching question.
Write the term from the word bank. Word bank: firewall · GUID · mediated search · switch · VPN
| Description | Term |
|---|---|
| A search done only in a chosen collection, such as a library's journal database | |
| Sends data only to the intended device inside one LAN | |
| An encrypted tunnel across the Internet to a company network | |
| Filters traffic into and out of a network according to rules | |
| A unique number that lets a site recognise your device everywhere |
A rural clinic has a fibre line, a router and 8 PCs that need to share patient files. Explain why a switch is needed as well as the router, and why the clinic should give nurses read-only rights to the doctors' folder.
Explain how SSL/TLS and a digital certificate protect a customer who pays a bill on a bank's website.
Discuss one benefit and one risk of social networking for a learner.
Explain how a cookie can reduce a learner's privacy and one way to limit this.
Explain what a firewall does.
| Paper | Topic | Circle one | My next step |
|---|---|---|---|
| Paper 1 | Recursion: trace and write | R A G | |
| Paper 1 | Strings, loops and decisions | R A G | |
| Paper 1 | Arrays and text files | R A G | |
| Paper 1 | OOP: class and form code | R A G | |
| Paper 1 | 2D arrays | R A G | |
| Paper 1 | SQL and database programming | R A G | |
| Paper 2 | Internet, search and web technologies | R A G | |
| Paper 2 | Networks, connections and remote access | R A G | |
| Paper 2 | Security: SSL, keys, firewall, MFA, blockchain | R A G | |
| Paper 2 | Society, social networking and privacy | R A G | |
| Paper 2 | Grade 10 and 11 theory (hardware, databases, cybercrime) | R A G |
| Week | Paper 1 task | Paper 2 task | Past paper question done |
|---|---|---|---|
| Week 4 before the exam | |||
| Week 3 | |||
| Week 2 | |||
| Last week |