Downloaded from hlayiso.com
NATIONAL
SENIOR CERTIFICATE
GRADE 12
SEPTEMBER 2022
INFORMATION TECHNOLOGY P1
MARKING GUIDELINE
MARKS: 150
This marking guideline consists of 16 pages.
Skip to contentMemorandum 











View all





Information Technology Grade 12 P1 Eastern Cape Mock 2022 Memo
Grade 12 Information Technology Paper 1 memorandum from the Eastern Cape Mock Exam 2022 (English), 16 pages. Read online or get the free PDF download, question paper linked when available.
Information Technology · Grade 12 · Eastern Cape Mock Exam · 2022 · English. Memorandum, 16 pages. Read online or download the PDF.
- Subject
- Information Technology
- Grade
- Grade 12
- Language
- English
- Document type
- Memorandum
- Year
- 2022
- Exam period
- Eastern Cape Mock Exam
- Paper
- 1
- Curriculum
- CAPS
- Pages
- 16
- File size
- 176.9 KB
Loading document…
Loading document…
1 of 16
Document textSearch extracted text and jump to a page.
Downloaded from hlayiso.com
2 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2022)
NAME OF LEARNER:
TOTAL TOTAL TOTAL TOTAL TOTAL
QUESTION 1: QUESTION 2: QUESTION 3: QUESTION 4:
/40 /40 /40 /30 /150
MAX. MARKS
QUESTION 1: GENERAL PROGRAMMING SKILLS MARKS ACHIEVED
1.1 Button [1.1 Shape]
shpTest.Shape := stcircle; ✓
shpTest.Brush.Color := clgreen; ✓ 4
gbxQuestion12.Visible := true; ✓
gbxQuestion13.Enabled := true; ✓
1.2 Button [1.2 Decode]
Get input from edtInput ✓
Set new string to empty string ✓
Loop until input string is empty ✓
8
Copy ordinal value and convert to integer ✓
Delete ordinal value from input string ✓
Convert ordinal value to character using CHR ✓
Add character to new string ✓
Display new string in edtOutput ✓
1.3 Button [1.3 Test]
Clear the list box ✓
Get input from spinedit ✓
Initialise array counter ✓
Get the number of prime factors from the input and store in array – 7 marks:
Outer Loop from 1 to the input ✓
Set number of prime factors to 0 ✓
Inner Loop from 1 to outer loop counter (nested loop) ✓
If inner loop counter is a prime factor ✓
Then increase number of prime factors by one ✓
If number of prime factors = 2 ✓
Then add outer loop counter to an array ✓
Copyright reserved Please turn over
Downloaded from hlayiso.com
(EC/SEPTEMBER 2022) INFORMATION TECHNOLOGY P1 3
Calculate and display the pairs of prime factors which add up to the input –
9 marks:
Set boolean flag to false ✓
Outer Loop from 1 to array counter – 1 ✓
Set number 1 variable to array[outer loop counter] ✓
Inner loop from outer loop counter to array count ✓
Set number 2 variable to inner loop[inner loop counter] ✓ 21
If number 1 + number 2 = input ✓
Then display both numbers in the listbox ✓
converted to string ✓
And set boolean flag to true ✓
If Boolean flag = false then ✓
Display suitable message in a showmessage component ✓
1.4 Button [1.4 Area]
Calculate area of square ✓
Calculate area of circle:
Pi * (0.9/(2 * Pi)) * (0.9/(2 * Pi)) ✓ using Pi or 3.1415 ✓ 7
Subtract area of square from area of circle ✓
Multiply by 100 ✓
Add answer to existing caption of lblOutput ✓
Rounded to 3 decimal places ✓
TOTAL QUESTION 1 40
Copyright reserved Please turn over
Downloaded from hlayiso.com
4 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2022)
MAX. MARKS
QUESTION 2: DATBASE PROGRAMMING
MARKS ACHIEVED
2.1.1 Button: [Q 2.1.1]
‘select DeliveryAddress, DeliveryDate from tblorders order by
deliverydate Desc’
Concepts: 3
SELECT two correct fields ✓
FROM correct table ✓
ORDER BY correct field DESC ✓
2.1.2 Button: [Q 2.1.2]
'select count(orderid) as Orders20orMore from tblorders where
items >= 20'
Concepts:
SELECT count(any field from Orders table) ✓ 4
as Orders20orMore ✓
FROM correct table ✓
WHERE items >=20 ✓
2.1.3 Button: [Q 2.1.3]
'select * from Orders where Deliveryaddress like ' +
quotedstr('%' + sline + '%')
Concepts: 4
SELECT * (all fields) ✓
FROM correct table ✓
WHERE DeliveryAddress LIKE ✓
quotedstr('%' + sline + '%') ✓
2.1.4 Button: [Q 2.1.4]
'update orders set collect = true where deliverydate is null'
Concepts: 3
Update tblOrders ✓
Set collect = true ✓
Where DeliveryDate is null ✓
2.1.5 Button: [Q 2.1.5]
'select DeliveryAddress, deliverydate - orderdate as
DaysToDeliver from tblOrders where collect = false'
Concepts: 4
Select DeliveryAdress ✓
DeliveryDate – OrderDate ✓
From Orders ✓
Where collect = false ✓
Copyright reserved Please turn over
Downloaded from hlayiso.com
(EC/SEPTEMBER 2022) INFORMATION TECHNOLOGY P1 5
2.1.6 Button: [Q 2.1.6]
'select ShopName, format(sum(orderamount,"currency") as
TOTALSales from tblorders, tblshop where tblshop.shopid =
tblorders.shopid group by shopname
Concepts:
Select ShopName, ✓ 7
format(sum(OrderAmount ✓, “currency”) ✓
as TOTALSales ✓
from tblOrders, tblShop ✓
where tblShop.ShopID = tblOrders.ShopID ✓
group by ShopName ✓
2.1 Subtotal: SQL 25
2.2.1 Button: [Q 2.2.1]
tblShop.First ✓
while not tblShop.eof do ✓ 5
if tblShop['Online'] = true then ✓
redOutput.Lines.Add(tblShop['ShopName']) ✓
tblShop.Next ✓
2.2.2 Button: [Q 2.2.2]
Go to first row of tblshop table and loop ✓
if ShopName = combobox item ✓
then set integer variable to ShopID ✓
go to next row of tblshop table
set real sum variable = 0 ✓
Go to first row of tblorders table and loop
10
If ShopID = integer variable from first loop ✓
Then display in redoutput:
OrderDate converted to string ✓
and OrderAmount in currency format ✓
Add OrderAmount to real sum variable ✓
Go to next row of tblOrders table ✓
After loop display real sum variable in richedit in
currency format ✓
2.2 Subtotal: Code constructs 15
TOTAL QUESTION 2 40
Copyright reserved Please turn over
Downloaded from hlayiso.com
6 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2022)
MAX. MARKS
QUESTION 3: OBJECT-ORIENTATED PROGRAMMING
MARKS ACHIEVED
3.1.1 Constructor Create:
Correct name ✓ with one string parameter and one
integer parameter ✓ 4
Set attributes to correct parameter values ✓
Set fCost = 70 * fHours ✓
3.1.2 procedure setTotalCost
Correct method – procedure ✓
One integer parameter ✓ 4
Set correct attribute (fTotalCost) ✓
= 70 * parameter ✓
3.1.3 Function CalculateDays(hours : integer) : integer
Correct method – integer function ✓
one integer parameter ✓
If hours > 8 ✓
6
then calculate and return correct days (use Ceil or
other method) ✓
else ✓
return 1 day ✓
3.1.4 function toString: string;
correct string method ✓
correct attributes returned as result ✓ 4
use #13, ✓
converted hours and cost (currency) to string ✓
2.1 Subtotal: Object class 18
3.2.1 Button [Q 3.2.1 Add to quote]
Get inputs from spinedit ✓and list box ✓
Instantiate the object
Object name = ✓ tRepair.create ✓
one string, one integer parameter ✓ In correct order ✓ 11
Use method of class ✓ and object name to display ✓
Display empty line in redQ3 ✓
Use method of class and object name ✓ to add up total
hours global variable ✓
3.2.2 Button [Q 3.2.2 Finalise Quote]
Use object name and method of the class ✓
to settotalcost with global total hours as parameter ✓
Use object name and method of the class ✓
to gettotalcost and set local variable ✓
11
If cbxparts is checked ✓ then add 150 to total cost ✓
Display days in richedit using object name ✓ and correct
method calculatedays with itotalhours as parameter ✓
converted to string ✓
Display total cost in richedit ✓converted to currency ✓
2.2 Subtotal: Form class 22
TOTAL QUESTION 3 40
Copyright reserved Please turn over
Downloaded from hlayiso.com
(EC/SEPTEMBER 2022) INFORMATION TECHNOLOGY P1 7
MAX. MARKS
QUESTION 4: PROBLEM-SOLVING
MARKS ACHIEVED
4.1 Assignfile statement ✓
Reset text file for reading ✓
Set column counter to 0 ✓
Loop through the text file ✓
Read a line ✓
Increment column ✓ 12
Set row = 1 ✓
Add line to array, ✓ converted to integer ✓
Read a line ✓
Set row = 2 ✓
Add line to array, converted to integer ✓
4.2 Set counters for A and B to 0 ✓
Set column counter to 0 ✓
Loop through array ✓
Set row = 1 ✓
Add 1 to column counter ✓
Set first number to array contents using column and row
counters ✓ [row, column]
Set row = 2 ✓
Set second number to array contents using column and
row counters ✓ [row, column]
if first number > second number ✓
18
then display in richedit
correct wording – district number and A ✓
increment A counter ✓
else ✓
display in richedit
correct wording – district number and B ✓
increment B counter ✓
if A counter > B counter ✓
then display winner A ✓
else ✓
display winner B ✓
TOTAL QUESTION 4 30
Copyright reserved Please turn over
Downloaded from hlayiso.com
8 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2022)
SAMPLE SOLUTIONS
QUESTION 1
procedure TfrmQuestion1.btnQ1_3Click(Sender: TObject);
var inum, i1,i2, k, x, m, ifactors : integer;
arrprime : array[1..100] of integer;
icount: integer;
bprime : boolean;
begin
lstoutput.clear;
icount := 0;
inum := sednumber.Value;
for k := 1 to inum do
begin
ifactors := 0;
for m := 1 to k do
begin
if k mod m = 0 then
inc(ifactors);
end;
if ifactors = 2 then
begin
inc(icount);
arrprime[icount] := k;
end;
end;
bprime := false;
for k := 1 to icount - 1 do
begin
i1 := arrprime[k];
for x := k + 1 to icount do
begin
i2 := arrprime[x];
if i1 + i2 = inum then
begin
lstoutput.Items.Add(inttostr(i1) + ' + ' + inttostr(i2));
bprime := true;
end;
end;
end;
if bprime = false then
showmessage(inttostr(inum) + ' cannot be calculated using the sum of two prime
numbers')
end;
Copyright reserved Please turn over
Downloaded from hlayiso.com
(EC/SEPTEMBER 2022) INFORMATION TECHNOLOGY P1 9
procedure TfrmQuestion1.btnQ1_4Click(Sender: TObject);
var rsq, rc : real;
rr : real;
begin
rsq := 0.2 * 0.2;
rc := Pi * (0.9/(2 * Pi)) * (0.9/(2 * Pi));
rr := (rc - rsq) * 100;
lbloutput.Caption := lbloutput.Caption + floattostrf(rr,fffixed,8,3) + ' square cm';
end;
procedure TfrmQuestion1.btnQ1_1Click(Sender: TObject);
begin
shptest.Shape := stcircle;
shptest.Brush.Color := clgreen;
gbquestion1_2.Visible := true;
gbquestion1_3.Enabled := true;
end;
procedure TfrmQuestion1.btnQ1_2Click(Sender: TObject);
var sline : string;
snew , sword : string;
k, inum : integer;
begin
// If text in edtinput is erased use the following as input:
// '73 84 32 105 115 32 101 97 115 121 33'
sline := edtinput.Text;
snew := '';
while length(sline) <> 0 do
begin
sword := copy(sline,1, pos(' ',sline) - 1);
delete(sline,1, pos(' ',sline));
inum := strtoint(sword);
snew := snew + chr(inum);
end;
edtoutput.text := snew;
end;
end.
Copyright reserved Please turn over
Downloaded from hlayiso.com
10 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2022)
QUESTION 2
procedure TQuestion_2.btnQuestion2_1_1Click(Sender: TObject);
// Provided code - do not change
var
sSQL1: String;
begin
/// enter your code below//
sSQL1 := 'select DeliveryAddress, DeliveryDate from orders order by deliverydate desc';
// Provided code - do not change
dbCONN.runSQL(sSQL1);
if length(ssql1) <> 0 then
dbconn.setgridforsql1(dbgsql);
end;
procedure TQuestion_2.btnQuestion2_1_2Click(Sender: TObject);
// Provided code - do not change
var
sSQL2: String;
begin
/// enter your code below//
sSQL2 := 'select count(orderid) as Orders20orMore from orders where items >= 20';
// Provided code - do not change
dbCONN.runSQL(sSQL2);
end;
procedure TQuestion_2.btnQuestion2_1_3Click(Sender: TObject);
// Provided code - do not change
var
sline : string;
sSQL3: String;
begin
sline := inputbox('Enter a street name','','Nxolo Street');
/// enter your code below//
sSQL3 := 'select * from Orders where Deliveryaddress like ' + quotedstr('%' + sline +
'%');
// Provided code - do not change
dbCONN.runSQL(sSQL3);
if length(ssql3) <> 0 then
dbconn.setgridforsql3(dbgsql);
end;
procedure TQuestion_2.btnQuestion2_1_4Click(Sender: TObject);
// Provided code - do not change
var
sSQL4: String;
begin
/// enter your code below//
sSQL4 := 'update orders set collect = true where deliverydate is null';
Copyright reserved Please turn over
Downloaded from hlayiso.com
(EC/SEPTEMBER 2022) INFORMATION TECHNOLOGY P1 11
// Provided code - do not change
dbCONN.executeSQL(sSQL4,dbgshop,dbgorder,dbgsql);
if length(ssql4) <> 0 then
dbconn.setgridforsql3(dbgsql);
end;
procedure TQuestion_2.btnQuestion2_1_5Click(Sender: TObject);
// Provided code - do not change
var
sSQL5: String;
begin
/// enter your code below//
sSQL5 := 'select DeliveryAddress, deliverydate - orderdate as DaysToDeliver from
Orders where collect = false';
// Provided code - do not change
dbCONN.runSQL(sSQL5);
if length(ssql5) <> 0 then
dbconn.setgridforsql5(dbgsql);
end;
procedure TQuestion_2.btnQuestion2_1_6Click(Sender: TObject);
// Provided code - do not change
var
sSQL6: String;
begin
/// enter your code below//
sSQL6 := 'select ShopName, format(sum(orderamount),"currency") as TOTALSales from
orders, shop where shop.shopid = orders.shopid group by shopname';
// Provided code - do not change
dbCONN.runSQL(sSQL6);
if length(ssql6) <> 0 then
dbconn.setgridforsql6(dbgsql);
end;
procedure TQuestion_2.btnQuestion2_2_1Click(Sender: TObject);
begin
// Provided code - do not change
redoutput.Clear;
redoutput.Lines.Add('Shops that are available for online shopping');
redoutput.Lines.Add('-----------------------------------------------------');
/// enter your code below//
tblshop.First;
while not tblshop.eof do
begin
if tblshop['Online'] = true then
redoutput.Lines.Add(tblshop['Shopname']) ;
tblshop.Next;
end;
end;
Copyright reserved Please turn over
Downloaded from hlayiso.com
12 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2022)
procedure TQuestion_2.btnQuestion2_2_2Click(Sender: TObject);
var sshop : string; // Provided code - do not change
bfound : boolean;
inum : integer;
rsum : real;
begin
// Provided code - do not change
redoutput.Clear;
redoutput.Lines.Add('Order Date' + #9 + 'Amount of order');
redoutput.Lines.Add('--------------------------------------------') ;
sshop := cmbshop.Text;
/// enter your code below//
bfound := false;
tblshop.First;
while (not tblshop.Eof) and (bfound = false) do
begin
if tblshop['shopname'] = sshop then
begin
inum := tblshop['shopid'];
bfound := true;
end;
tblshop.Next;
end;
rsum := 0;
tblorders.first;
while not tblorders.eof do
begin
if tblorders['shopid'] = inum then
begin
redoutput.Lines.Add(datetostr(tblorders['Orderdate']) + #9 +
floattostrf(tblorders['orderamount'],ffcurrency,8,2));
rsum := rsum + tblorders['orderamount'];
end;
tblorders.Next;
end;
redoutput.Lines.Add('');
redoutput.Lines.Add('Total amount ordered: '+ floattostrf(rsum,ffcurrency,8,2));
end;
Copyright reserved Please turn over
Downloaded from hlayiso.com
(EC/SEPTEMBER 2022) INFORMATION TECHNOLOGY P1 13
QUESTION 3
Class Unit:
unit Question3ClassDefinition;
interface
uses sysutils, math, dialogs;
type
TRepair = class
private
frepairname : string;
fhours : integer;
fcost : real;
ftotalcost : real;
public
constructor create(sname : string; ihrs : integer);
function calculatedays(ihrs : integer) : integer;
function gethours : integer;
function tostring : string;
procedure settotalcost(ihrs : integer);
function gettotalcost : real;
end;
implementation
{ TRepair }
constructor TRepair.create(sname: string; ihrs: integer);
begin
frepairname := sname;
fhours := ihrs;
fcost := 70 * fhours;
end;
// provided code do not delete//
function TRepair.gethours: integer;
begin
result := fhours;
end;
// provided code do not delete//
function TRepair.gettotalcost: real;
begin
result := ftotalcost;
end;
procedure TRepair.settotalcost(ihrs: integer);
begin
ftotalcost := ihrs * 70;
end;
Copyright reserved Please turn over
Downloaded from hlayiso.com
14 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2022)
function TRepair.calculatedays(ihrs: integer) : integer;
var idays : integer;
begin
if ihrs > 8 then
begin
idays := ceil(ihrs/8);
end
else
idays := 1;
result := idays;
end;
function TRepair.tostring: string;
begin
result := frepairname +
#13 + 'Hours to complete: ' + inttostr(fhours) +
#13 + 'Labour Cost: ' + floattostrf(fcost,ffcurrency,8,2)
end;
end.
Main Unit:
procedure TForm1.btnQ3_2_1Click(Sender: TObject);
begin
objrepair := trepair.create(lstrepairs.Items[lstrepairs.ItemIndex],sedhours.value);
redq3.Lines.Add(objrepair.tostring);
redq3.Lines.Add('');
itotalhours := itotalhours + objrepair.gethours;
end;
procedure TForm1.cbxBuyPartsClick(Sender: TObject);
var rcost : real;
begin
objrepair.settotalcost(itotalhours);
rcost := objrepair.gettotalcost;
if cbxparts.checked = true then
rcost := rcost + 150;
redq3.Lines.Add('');
redq3.Lines.Add('Total days to complete all jobs = ' +
inttostr(objrepair.calculatedays(itotalhours)));
redq3.Lines.Add('Total labour cost = ' + floattostrf(rcost,ffcurrency,8,2));
end;
Copyright reserved Please turn over
Downloaded from hlayiso.com
(EC/SEPTEMBER 2022) INFORMATION TECHNOLOGY P1 15
QUESTION 4
unit Question4_u;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Grids, ComCtrls;
type
TForm1 = class(TForm)
pgc: TPageControl;
tbsvoting: TTabSheet;
btnQ4_1: TButton;
btnQ4_2: TButton;
redQ4: TRichEdit;
procedure btnQ4_1Click(Sender: TObject);
procedure btnQ4_2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
arrvotes : array[1..2,1..10] of integer;
implementation
{$R *.dfm}
procedure TForm1.btnQ4_1Click(Sender: TObject);
var myfile : textfile;
irow, icol, inum: integer;
sline : string;
begin
assignfile(myfile, 'votes.txt');
reset(myfile);
icol := 0;
while not eof(myfile) do
begin
readln(myfile,sline);
inc(icol);
irow := 1;
arrvotes[irow,icol] := strtoint(sline);
readln(myfile,sline);
irow := 2;
arrvotes[irow, icol] := strtoint(sline);
end;
end;
Copyright reserved Please turn over
Downloaded from hlayiso.com
16 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2022)
procedure TForm1.btnQ4_2Click(Sender: TObject);
var
irow, icol, inum1, inum2, k, ia, ib : integer;
begin
icol := 0;
ia := 0;
ib := 0;
while icol < 10 do
begin
irow := 1 ;
inc(icol);
inum1 := arrvotes[irow,icol] ;
irow := 2;
inum2 := arrvotes[irow,icol];
if inum1 > inum2 then
begin
redq4.Lines.Add('District '+ inttostr(icol) + ' winner is A');
inc(ia);
end
else
begin
redq4.Lines.Add('District '+ inttostr(icol) + ' winner is B');
inc(ib);
end;
end;
redq4.Lines.Add('');
if ia > ib then
redq4.Lines.Add('The overall winner is A')
else
redq4.Lines.Add('The overall winner is B')
end;
end.
Copyright reserved Please turn over
Study this subject
Revise the topics in this paper, then practise them question by question.
- Grade 12 Information Technology notes
CAPS revision notes with worked examples.
- Information Technology questions by topic
Past exam questions sorted by CAPS topic, with memos where available.
- All Grade 12 Information Technology past papers
Past papers by year, with memos where available.
- Grade 12 past papers
More Information Technology and other subjects in this collection.
Recommended for this subject
More papers and memos for this grade and subject.

Memorandum
Information Technology Grade 12 Eastern Cape Mock 2025 Memo

Memorandum
Information Technology Grade 12 P1 NSC June 2025 Memo (English)

Memorandum
Information Technology Grade 12 P1 Eastern Cape Prelim 2024 Memo

Memorandum
Information Technology Grade 12 P2 Eastern Cape Prelim 2024 Memo

Memorandum
Information Technology Grade 12 P2 Eastern Cape Mock 2023 Memo

Memorandum
Information Technology Grade 12 P2 Eastern Cape Mock 2021 Memo
Related documents

Memorandum
Information Technology Grade 12 P1 Eastern Cape Mock 2019 Memo

Question paper
Information Technology Grade 12 P2 Eastern Cape Mock 2022 QP

Question paper
Information Technology Grade 12 P1 Eastern Cape Mock 2020 QP

Question paper
Information Technology Grade 12 P1 Eastern Cape Mock 2019 QP

Question paper
Information Technology Grade 12 P1 Eastern Cape Mock 2018 QP

Memorandum
Information Technology Grade 12 P2 Eastern Cape Mock 2017 Memo
More from Grade 12 Information Technology

Question paper
Information Technology Grade 12 P2 Eastern Cape Prelim 2024 QP

Question paper
Information Technology Grade 12 P1 November 2024 NSC QP

Question paper
Information Technology Grade 12 P1 NSC June 2023 Question Paper

Question paper
Information Technology Grade 12 P1 NSC June 2023 Question Paper

Question paper
Information Technology Grade 12 P1 NSC June 2023 Question Paper

Question paper