Mock
hlayiso mock exams
Practice Series:
Grade 12 NSC Preparation
WWW.HLAYISO.COM
NATIONAL
SENIOR CERTIFICATE
GRADE 12
INFORMATION TECHNOLOGY P1
MOCK EXAMINATION 2026
MARKS: 150
TIME: 3 hours
This question paper consists of 27 pages, 2 data pages,
2 pages for planning and a separate information sheet.
Copyright reserved Please turn over
Skip to contentAll 2026 papers 





View all



_hlayiso.com_--7454979b-cba2-4b39-a884-69e6b1c0f5c6/v1-3f9dc1675d92ae7768e5/card.webp)
_hlayiso.com_--500d3219-d02f-4c1c-af0e-452a5fe87f3b/v1-bfe5f3f664d3f236ff89/card.webp)
Information Technology Grade 12 P1 NSC November Mock 2026 QP
Grade 12 Information Technology Paper 1 question paper from the NSC November Mock Exam 2026 (English), 32 pages. Read online or download the free PDF.
Information Technology · Grade 12 · NSC November Mock Exam · 2026 · English. Question paper, 32 pages. Read online or download the PDF.
- Subject
- Information Technology
- Grade
- Grade 12
- Language
- English
- Document type
- Question paper
- Year
- 2026
- Exam period
- NSC November Mock Exam
- Paper
- 1
- Publisher
- Hlayiso
- Curriculum
- CAPS
- Pages
- 32
- File size
- 222.8 KB
Free to read online, no sign-up needed
Loading document…
Loading document…
1 of 32
This exam
NSC November Mock Exam 2026
- Paper 1Question paperMemo
- Paper 2Question paperMemo
Document textSearch extracted text and jump to a page.
Information Technology/P1 2 Hlayiso/Mock 2026
NSC Mock
INSTRUCTIONS AND INFORMATION
1. This question paper is divided into FOUR sections. Candidates must answer ALL the
questions in ALL FOUR sections.
2. Two blank pages have been provided at the end of the question paper, which may be
used for planning purposes.
3. The duration of this examination is three hours. Because of the nature of this
examination, it is important to note that you will not be permitted to leave the
examination room before the end of the examination session.
4. This question paper is set with programming terms that are specific to the Delphi
programming language. The Delphi programming language must be used to answer
the questions.
5. Make sure that you answer the questions according to the specifications that are given
in each question. Marks will be awarded according to the set requirements.
6. Answer only what is asked in each question. For example, if the question does not ask
for data validation, then no marks will be awarded for data validation.
7. Your programs must be coded in such a way that they will work with any data and not
just the sample data supplied or any data extracts that appear in the question paper.
8. Routines, such as search, sort and selection, must be developed from first principles.
You may NOT use the built-in features of the Delphi programming language for any of
these routines.
9. All data structures must be defined by you, the programmer, unless the data structures
are supplied.
10. You must save your work regularly on the disk/CD/DVD/flash disk you have been given,
or on the disk space allocated to you for this examination session.
11. Make sure that your examination number appears as a comment in every program that
you code, as well as on every event indicated.
12. If required, print the programming code of all the programs/classes that you completed.
Your examination number must appear on all printouts. You will be given half an hour
printing time after the examination session.
13. At the end of this examination session, you must hand in a disk/CD/DVD/flash disk with
all your work saved on it OR you must make sure that all your work has been saved on
the disk space allocated to you for this examination session. Ensure that all files can
be read.
Copyright reserved Please turn over
Information Technology/P1 3 Hlayiso/Mock 2026
NSC Mock
14. The files that you need to complete this question paper have been provided to you
on the disk/CD/DVD/flash disk or on the disk space allocated to you, in a folder called
DataMock2026.
Once copied, the following list of files will be available in the folder DataMock2026:
Question 1: Question 3:
Dams.txt Meter_U.pas
Question1_P.dpr Question3_P.dpr
Question1_P.dproj Question3_P.dproj
Question1_U.dfm Question3_U.dfm
Question1_U.pas Question3_U.pas
Question 2: Question 4:
AnimalSheltersDB.mdb Question4_P.dpr
AnimalSheltersDB - Copy.mdb Question4_P.dproj
ConnectDB_U.pas Question4_U.dfm
Question2_P.dpr Question4_U.pas
Question2_P.dproj
Question2_U.dfm
Question2_U.pas
Copyright reserved Please turn over
Information Technology/P1 4 Hlayiso/Mock 2026
NSC Mock
SECTION A
QUESTION 1: GENERAL PROGRAMMING SKILLS
Do the following:
• Open the incomplete program in the Question 1 folder.
• Enter your examination number as a comment in the first line of the Question1_U.pas file.
• Compile and execute the program. The program has limited functionality currently.
Example of the graphical user interface (GUI):
Question 1 - General programming skills – □ ×
1.1 1.4
Commuter type
1.1.1 - Panel Adult Number of trips:
Learner 1
Pensioner
1.1.2 - Time Duration
1.4 - Fare
1.2
Amount invested (P): 1.2 - Invest
Interest rate % (r):
1.5
Number of years (n):
Phrase:
1.5 - Hashtag
1.3
1.3 - Dam levels
• Complete the code for each section of QUESTION 1, as described in QUESTION 1.1 to
QUESTION 1.5 below.
Copyright reserved Please turn over
Information Technology/P1 5 Hlayiso/Mock 2026
NSC Mock
1.1 Write code for buttons btnQ1_1_1 and btnQ1_1_2 as specified below.
1.1.1 Button [1.1.1 - Panel]
Write code to change the properties of the panel pnlQ1_1 as follows:
• Display the text ’Water is life!’ on the panel.
• Change the colour of the panel to aqua (clAqua).
• Change the font colour of the panel to navy (clNavy).
• Change the font size of the panel to 18.
Example of output:
1.1.1 - Panel Water is life!
(4)
1.1.2 Button [1.1.2 - Time]
A water pump at a treatment plant ran for a total of 7 385 seconds
during one session. A constant SECONDS = 7385 has been
provided.
Write code that uses the DIV and MOD operators to convert the
value of the constant to hours, minutes and seconds. Display the
result in the label lblQ1_1_2 in the following format:
<hours> h <minutes> min <seconds> s
Example of output:
1.1.2 - Time 2 h 3 min 5 s
(4)
1.2 Button [1.2 - Invest]
A learner wants to invest money in a savings account where the interest is
compounded monthly. The final amount (A) after n years is calculated using
the following formula:
( r )12n
A = P 1+
1200
where P is the amount invested, r is the annual interest rate as a percentage
and n is the number of whole years.
Write code to do the following:
• Extract the values of P, r and n from the edit boxes edtQ1_2_P,
edtQ1_2_R and edtQ1_2_N respectively.
• Use the formula and an appropriate mathematical function to calculate the
final amount A.
• Display the final amount in the label lblQ1_2 with the text ’Final amount: ’,
in currency format with a rand sign and rounded to TWO decimal places.
Copyright reserved Please turn over
Information Technology/P1 6 Hlayiso/Mock 2026
NSC Mock
Example of input and output where P = 5000, r = 7.5 and n = 3:
1.2
Amount invested (P): 5000 1.2 - Invest
Interest rate % (r): 7.5
Number of years (n): 3
Final amount: R 6257.23
Example of input and output where P = 12500, r = 9.25 and n = 5:
1.2
Amount invested (P): 12500 1.2 - Invest
Interest rate % (r): 9.25
Number of years (n): 5
Final amount: R 19815.32
(8)
Copyright reserved Please turn over
Information Technology/P1 7 Hlayiso/Mock 2026
NSC Mock
1.3 Button [1.3 - Dam levels]
The text file called Dams.txt contains the names of dams in South Africa and
the level of the water in each dam, as a percentage of its full capacity, on a
particular day. (The levels are fictitious.)
The format of each line in the text file is as follows:
<name of dam>;<percentage full>
Example of the first three lines in the text file:
Vaal Dam;87.4
Sterkfontein Dam;98.9
Gariep Dam;63.2
Code has been provided to declare a text file variable tFile and to clear the
rich edit redQ1_3.
Write code to do the following:
• Test whether the text file Dams.txt exists. If the file does not exist, display
a suitable message and exit the procedure.
• Assign the text file to the variable tFile and prepare the file for reading.
• Read each line in the text file and extract the name of the dam and the
percentage.
• Display the name of the dam and the percentage, formatted to ONE
decimal place, in the rich edit redQ1_3 in the following format:
<name of dam> - <percentage>%
• If the percentage of a dam is below 50, add the text ’ (LOW)’ to the end of
the line.
• After all the lines in the text file have been processed, display the number
of dams with a level below 50% in the following format:
Number of dams below 50%: <number of dams>
Example of output:
1.3 - Dam levels
Vaal Dam - 87.4%
Sterkfontein Dam - 98.9%
Gariep Dam - 63.2%
Theewaterskloof Dam - 45.7% (LOW)
Kouga Dam - 21.3% (LOW)
Hartbeespoort Dam - 92.0%
Midmar Dam - 71.8%
Albert Falls Dam - 38.4% (LOW)
Loskop Dam - 81.5%
Bloemhof Dam - 49.9% (LOW)
Kalkfontein Dam - 17.6% (LOW)
Pongolapoort Dam - 66.0%
Number of dams below 50%: 5
(10)
Copyright reserved Please turn over
Information Technology/P1 8 Hlayiso/Mock 2026
NSC Mock
1.4 Button [1.4 - Fare]
A bus company charges the following fare per trip, depending on the type of
commuter:
Commuter type Fare per trip
Adult R25.00
Learner R15.00
Pensioner R12.50
A commuter who buys 10 or more trips at a time receives a 10% discount on
the total fare.
Write code to do the following:
• Determine the fare per trip based on the commuter type selected in the
radio group rgpQ1_4.
• Extract the number of trips from the spin edit spnQ1_4.
• Calculate the total fare and apply the discount, if applicable.
• Display the total fare in the label lblQ1_4 with the text ’Total fare: ’, in
currency format with a rand sign and rounded to TWO decimal places.
Example of input and output if a learner buys 12 trips:
1.4
Commuter type
Adult Number of trips:
Learner 12
Pensioner
1.4 - Fare
Total fare: R 162.00
Example of input and output if an adult buys 4 trips:
1.4
Commuter type
Adult Number of trips:
Learner 4
Pensioner
1.4 - Fare
Total fare: R 100.00
(6)
Copyright reserved Please turn over
Information Technology/P1 9 Hlayiso/Mock 2026
NSC Mock
1.5 Button [1.5 - Hashtag]
A water-saving campaign creates hashtags for social media from phrases
entered by the user in the edit box edtQ1_5.
Code has been provided to store the content of the edit box edtQ1_5 in the
variable sPhrase.
Write code to create a hashtag from the phrase as follows:
• Remove all the spaces from the phrase.
• The first letter of each word must be in upper case and all the other letters
must be in lower case.
• Add the ’#’ character to the beginning of the hashtag.
• Display the hashtag in the memo memQ1_5.
NOTE: The words in the phrase may be separated by more than one space.
Example of input and output if the phrase ’save WATER every day’ was
entered:
1.5
Phrase: save WATER every day
1.5 - Hashtag
#SaveWaterEveryDay
(8)
• Enter your examination number as a comment in the first line of the program file.
• Save your program.
• Print the code if required.
TOTAL SECTION A: 40
Copyright reserved Please turn over
Information Technology/P1 10 Hlayiso/Mock 2026
NSC Mock
SECTION B
QUESTION 2: DATABASE PROGRAMMING
A non-profit organisation coordinates a network of animal shelters across South Africa. It
needs an application to manage information about the shelters and the animals waiting to
be adopted.
A database called AnimalSheltersDB.mdb has been developed for this purpose.
The database contains two tables called tblShelters and tblAnimals.
NOTE: The data pages attached at the end of the question paper provide information on the
design of the AnimalSheltersDB.mdb database and its contents.
Do the following:
• Open the incomplete project file called Question2_P.dpr in the Question 2 folder.
• Enter your examination number as a comment in the first line of the Question2_U.pas unit
file.
• Compile and execute the program. The program has no functionality currently. The
contents of the tables are displayed, as shown below, on the selection of tab sheet 2.2 -
Delphi code.
Question 2 - Database programming – □ ×
2.1 - SQL 2.2 - Delphi code
tblShelters
ShelterID ShelterName Town Province Capacity ContactNumber
1 Paws Haven Bellville Western Cape 6 0219483310
2 Second Chance Shelter Soweto Gauteng 8 0119382245
3 Ubuntu Animal Rescue Durban KwaZulu-Natal 5 0313047782
4 Karoo Kennels Beaufort West Western Cape 4 0234158890
5 Highveld Animal Haven Pretoria Gauteng 7 0123316604
6 Lowveld Pet Rescue Mbombela Mpumalanga 4 0137520918
7 Coastal Critter Care Gqeberha Eastern Cape 6 0413649921
tblAnimals
AnimalID AnimalName Species Breed DateArrived Weight AdoptionFee Sterilised ShelterID
1 Bella Dog Labrador mix 2025/03/14 24.5 R950.00 True 1
2 Simba Cat Domestic shorthair 2025/11/02 4.2 R650.00 True 2
3 Rocky Dog Boerboel 2024/12/20 58.0 R1 200.00 False 2
4 Luna Cat Siamese 2026/01/09 3.6 R700.00 True 3
5 Max Dog Jack Russell 2025/07/30 7.8 R850.00 True 5
6 Coco Rabbit Lop-eared 2026/02/17 2.1 R300.00 False 1
7 Duke Dog Rottweiler 2025/05/05 45.3 R1 100.00 True 6
2.2.1 2.2.2
2.2.1 - Add animal 2.2.2 - Capacity report
Restore database Close
Copyright reserved Please turn over
Information Technology/P1 11 Hlayiso/Mock 2026
NSC Mock
• Follow the instructions below to complete the code for each section, as described in
QUESTION 2.1 and QUESTION 2.2.
• Use SQL statements to answer QUESTION 2.1 and Delphi code to answer QUESTION
2.2.
NOTE:
• The ’Restore database’ button is provided to restore the data contained in the database to
the original content.
• Code is provided to link the GUI components to the database. Do NOT change any of the
code provided.
• Do NOT open the database in Microsoft Access during the examination.
• TWO variables are declared as public variables, as described in the table below.
Variable Data type Description
tblShelters TADOTable Refers to the table tblShelters
tblAnimals TADOTable Refers to the table tblAnimals
Copyright reserved Please turn over
Information Technology/P1 12 Hlayiso/Mock 2026
NSC Mock
2.1 Tab sheet [2.1 - SQL]
Example of the graphical user interface (GUI) for QUESTION 2.1:
Question 2 - Database programming – □ ×
2.1 - SQL 2.2 - Delphi code
2.1.1 - Not sterilised 2.1.4 - Average weight
2.1.2 - Arrivals in 2026 2.1.5 - Animals per shelter
2.1.3 - Large dog discount Select a province
Results
Restore database Close
NOTE:
• Use ONLY SQL statements to answer QUESTION 2.1.1 to QUESTION
2.1.5.
• Code to execute the SQL statements and display the results of the queries
is provided. The SQL statements assigned to the variables sSQL1,
sSQL2, sSQL3, sSQL4 and sSQL5 are incomplete.
Complete the SQL statements to perform the tasks described in QUESTION
2.1.1 to QUESTION 2.1.5 below.
Copyright reserved Please turn over
Information Technology/P1 13 Hlayiso/Mock 2026
NSC Mock
2.1.1 Button [2.1.1 - Not sterilised]
Display all the fields of the animals in the tblAnimals table that have
NOT been sterilised.
Example of output:
AnimalID AnimalName Species Breed DateArrived Weight AdoptionFee Sterilised ShelterID
3 Rocky Dog Boerboel 2024/12/20 58.0 R1 200.00 False 2
6 Coco Rabbit Lop-eared 2026/02/17 2.1 R300.00 False 1
8 Nala Cat Domestic longhair 2025/09/21 4.9 R650.00 False 2
12 Zara Dog German Shepherd 2025/12/24 33.0 R1 150.00 False 2
15 Thabo Dog Pit bull terrier 2025/01/27 27.6 R1 000.00 False 2
16 Pebbles Rabbit Netherland dwarf 2026/05/06 1.2 R350.00 False 5
18 Whiskers Cat Domestic shorthair 2026/01/30 3.9 R600.00 False 6
21 Rex Dog Labrador mix 2026/06/01 29.1 R950.00 False 2
24 Chico Dog Chihuahua 2025/11/15 2.6 R800.00 False 6
29 Bolt Dog Whippet 2026/04/25 12.3 R900.00 False 5
30 Sasha Cat Siamese 2025/05/31 3.8 R700.00 False 1
36 Spike Dog Bull terrier 2025/12/11 24.0 R1 000.00 False 1
(3)
2.1.2 Button [2.1.2 - Arrivals in 2026]
Display the AnimalName, Species and DateArrived fields of all the
animals that arrived at a shelter during 2026. The records must be
sorted from the most recent arrival date to the earliest arrival date.
Example of output of the first five records:
AnimalName Species DateArrived
Patch Dog 2026/06/22
Rex Dog 2026/06/01
Cleo Cat 2026/05/20
Pebbles Rabbit 2026/05/06
Bolt Dog 2026/04/25
(4)
2.1.3 Button [2.1.3 - Large dog discount]
Large dogs take longer to be adopted. The adoption fee of every
dog that weighs more than 40 kg must be reduced by R150.
Example of output of the updated records only:
AnimalID AnimalName Species Breed DateArrived Weight AdoptionFee Sterilised ShelterID
3 Rocky Dog Boerboel 2024/12/20 58.0 R1 050.00 False 2
7 Duke Dog Rottweiler 2025/05/05 45.3 R950.00 True 6
19 Bruno Dog Great Dane 2025/04/22 62.4 R1 150.00 True 1
(4)
Copyright reserved Please turn over
Information Technology/P1 14 Hlayiso/Mock 2026
NSC Mock
2.1.4 Button [2.1.4 - Average weight]
Display each species and the average weight of the animals of
that species, rounded to ONE decimal place, in a new field called
AvgWeight.
Example of output:
Species AvgWeight
Cat 4.5
Dog 24.3
Rabbit 2.1
(4)
2.1.5 Button [2.1.5 - Animals per shelter]
The user must select a province from the combo box cmbQ2_1_5.
Code has been provided to store the selected province in the
variable sProvince.
Display the name of each shelter in the selected province and the
number of animals at that shelter, in a new field called NumAnimals.
Example of output if ’Western Cape’ was selected:
ShelterName NumAnimals
Karoo Kennels 2
Paws Haven 5
Example of output if ’Gauteng’ was selected:
ShelterName NumAnimals
Highveld Animal Haven 6
Second Chance Shelter 10
(7)
2.2 Tab sheet [2.2 - Delphi code]
NOTE:
• Use ONLY Delphi programming code to answer QUESTION 2.2.1 and
QUESTION 2.2.2.
• NO marks will be awarded for SQL statements in QUESTION 2.2.
Copyright reserved Please turn over
Information Technology/P1 15 Hlayiso/Mock 2026
NSC Mock
2.2.1 Button [2.2.1 - Add animal]
A cat has just been brought to the Mangaung Pet Shelter. Write code
to add a new record to the tblAnimals table with the details below.
Field Value
AnimalName Juju
Species Cat
Breed Tortoiseshell
DateArrived The current system date
Weight 3.2
AdoptionFee 650
Sterilised False
ShelterID 8
NOTE: The AnimalID field is an AutoNumber field and will be
generated automatically.
Example of the last two records in the tblAnimals table after the
record was added:
AnimalID AnimalName Species Breed DateArrived Weight AdoptionFee Sterilised ShelterID
36 Spike Dog Bull terrier 2025/12/11 24.0 R1 000.00 False 1
37 Juju Cat Tortoiseshell <current date> 3.2 R650.00 False 8
(6)
Copyright reserved Please turn over
Information Technology/P1 16 Hlayiso/Mock 2026
NSC Mock
2.2.2 Button [2.2.2 - Capacity report]
The organisation needs to know whether any shelter is housing more
animals than it was designed for.
Write code to do the following for EACH shelter in the tblShelters
table:
• Determine the number of animals at the shelter by using the
tblAnimals table.
• Calculate the percentage of the capacity of the shelter that is
being used, using the following formula:
percentage = number of animals ÷ capacity × 100
• Display the name of the shelter, the number of animals and the
percentage, formatted to ONE decimal place, in the rich edit
redQ2_2_2 in the following format:
<ShelterName>: <number> animals (<percentage>%)
• If the number of animals at the shelter is more than the capacity
of the shelter, add the text ’ *** OVER CAPACITY ***’ to the end
of the line.
Example of output for the original data in the database:
2.2.2 - Capacity report
Paws Haven: 5 animals (83.3%)
Second Chance Shelter: 10 animals (125.0%) *** OVER CAPACITY ***
Ubuntu Animal Rescue: 4 animals (80.0%)
Karoo Kennels: 2 animals (50.0%)
Highveld Animal Haven: 6 animals (85.7%)
Lowveld Pet Rescue: 5 animals (125.0%) *** OVER CAPACITY ***
Coastal Critter Care: 4 animals (66.7%)
Mangaung Pet Shelter: 0 animals (0.0%)
(12)
• Enter your examination number as a comment in the first line of the program file.
• Save your program.
• Print the code if required.
TOTAL SECTION B: 40
Copyright reserved Please turn over
Information Technology/P1 17 Hlayiso/Mock 2026
NSC Mock
SECTION C
QUESTION 3: OBJECT-ORIENTATED PROGRAMMING
A municipality sells prepaid electricity to households and businesses. A program is needed to
manage the prepaid electricity meters of customers.
Do the following:
• Open the incomplete program in the Question 3 folder.
• Open the incomplete object class Meter_U.pas.
• Enter your examination number as a comment in the first line of both the Question3_U.pas
file and the Meter_U.pas file.
• Compile and execute the program. The program has limited functionality currently.
Example of the graphical user interface (GUI):
Question 3 - Object-orientated programming – □ ×
3.2.1
Meter number: 04123456789
Owner: Lerato Dlamini
Tariff
Domestic - R3.12
Business - R3.65
Agricultural - R2.98
Subsidised household
3.2.1 - Instantiate object
3.2.2
3.2.2 - Validate meter number
3.2.3
Amount (R): 100
3.2.3 - Buy electricity
• Complete the code as specified in QUESTION 3.1 and QUESTION 3.2 that follow.
NOTE: You are NOT allowed to add any additional attributes or user-defined methods, unless
explicitly stated in the question.
Copyright reserved Please turn over
Information Technology/P1 18 Hlayiso/Mock 2026
NSC Mock
3.1 The provided incomplete object class (TPrepaidMeter) contains the
declaration of five attributes, which describe a prepaid meter object.
The attributes for a prepaid meter object have been declared as follows:
Attribute Type Description
fMeterNo String The meter number
fOwner String The name of the owner of the meter
fTariff Real The price per unit of electricity (in rand per kWh)
fSubsidised Boolean True if the household qualifies for subsidised
electricity, otherwise False
fUnits Real The number of units (kWh) of electricity
available on the meter
The following methods have also been provided:
• The heading of a constructor method
• A mutator method called setTariff
• An auxiliary method called unitsForAmount that receives an amount of
money (in rand) as a real parameter and returns the number of units (kWh)
that can be bought for that amount at the tariff stored in the fTariff attribute
Complete the code in the object class as described in QUESTION 3.1.1 to
QUESTION 3.1.5 below.
3.1.1 Write code for the constructor method that receives the meter
number, the name of the owner, the tariff and a Boolean value
indicating whether the household is subsidised, as parameters.
Assign the parameters to the fMeterNo, fOwner, fTariff and
fSubsidised attributes respectively, and initialise the fUnits
attribute to zero. (3)
3.1.2 Write code for an accessor method called getUnits to return the
value of the fUnits attribute. (2)
3.1.3 Write code for a method called isValidMeterNo that returns a
Boolean value.
A meter number is valid if it consists of exactly 11 characters and
ALL the characters are digits. The method must return True if the
value of the fMeterNo attribute is valid, and False if it is not valid. (5)
3.1.4 Write code for a method called buyElectricity that receives an
amount of money (in rand) as a real parameter.
The method must use the provided unitsForAmount method
to determine the number of units bought. Households that are
subsidised receive 10% more units than the number of units bought.
Add the units to the fUnits attribute. (4)
Copyright reserved Please turn over
Information Technology/P1 19 Hlayiso/Mock 2026
NSC Mock
3.1.5 Write code for a method called toString to return a string with the
details of the meter, in the following format:
Meter number: <fMeterNo>
Owner: <fOwner> (<Subsidised/Not subsidised>)
Tariff: R<fTariff> per kWh
Units available: <fUnits> kWh
The tariff must be formatted to TWO decimal places and the units to
ONE decimal place. Each part must be displayed on a new line.
Example:
Meter number: 04123456789
Owner: Lerato Dlamini (Subsidised)
Tariff: R3.12 per kWh
Units available: 70.5 kWh
(5)
Copyright reserved Please turn over
Information Technology/P1 20 Hlayiso/Mock 2026
NSC Mock
3.2 An incomplete program has been supplied in the Question 3 folder. The
program contains code for the object class to be accessible and declares
an object variable called objMeter.
Write code to perform the tasks described in QUESTION 3.2.1 to QUESTION
3.2.3 that follow.
3.2.1 Button [3.2.1 - Instantiate object]
Code has been provided to clear the output area redQ3 and to
extract the meter number and the name of the owner from the edit
boxes edtQ3_2_1_Meter and edtQ3_2_1_Owner.
Write code to do the following:
• Extract the tariff from the item selected in the radio group
rgpQ3_2_1 as a real value. The tariff is the part of the item after
the letter ’R’, for example 3.12 for the item ’Domestic - R3.12’.
• Use the check box chkQ3_2_1 to determine whether the
household is subsidised.
• Use the information extracted to instantiate the objMeter object.
• Display the details of the object in the output area redQ3, using
the toString method.
Example of input and output:
Question 3 - Object-orientated programming – □ ×
3.2.1
Meter number: 04123456789
Meter number: 04123456789 Owner: Lerato Dlamini (Subsidised)
Tariff: R3.12 per kWh
Owner: Lerato Dlamini Units available: 0.0 kWh
Tariff
Domestic - R3.12
Business - R3.65
Agricultural - R2.98
✓ Subsidised household
3.2.1 - Instantiate object
3.2.2
3.2.2 - Validate meter number
3.2.3
Amount (R): 100
3.2.3 - Buy electricity
(8)
Copyright reserved Please turn over
Information Technology/P1 21 Hlayiso/Mock 2026
NSC Mock
3.2.2 Button [3.2.2 - Validate meter number]
Write code to call the isValidMeterNo method to determine whether
the meter number of the object is valid.
• If the meter number is valid, display the message ’Valid meter
number’ in the output area redQ3.
• If the meter number is NOT valid, display the message ’Invalid
meter number - purchases are not allowed’ in the output area
redQ3 and disable the button btnQ3_2_3.
Example of output if the meter number 04123456789 was entered:
Meter number: 04123456789
Owner: Lerato Dlamini (Subsidised)
Tariff: R3.12 per kWh
Units available: 0.0 kWh
Valid meter number
Example of output if the meter number 0412345678X was entered:
Meter number: 0412345678X
Owner: Sipho Ndlovu (Not subsidised)
Tariff: R3.65 per kWh
Units available: 0.0 kWh
Invalid meter number - purchases are not allowed
(4)
Copyright reserved Please turn over
Information Technology/P1 22 Hlayiso/Mock 2026
NSC Mock
3.2.3 Button [3.2.3 - Buy electricity]
The user must select the amount (in whole rand) to be spent on
electricity from the spin edit spnQ3_2_3.
Write code to do the following:
• If the amount selected is less than R20, display the message ’The
minimum purchase amount is R20’ in a dialog box.
• Otherwise:
o Call the buyElectricity method with the amount as an
argument.
o Generate a 20-digit electricity token that consists of randomly
generated digits (0 to 9). A space must be inserted after every
fourth digit, except after the last digit.
o Display the token in the output area redQ3 in the following
format:
Token: <token>
o Display the updated details of the object in the output area
redQ3, using the toString method.
Example of output if R200 was selected after the object in
QUESTION 3.2.1 was instantiated and validated:
Meter number: 04123456789
Owner: Lerato Dlamini (Subsidised)
Tariff: R3.12 per kWh
Units available: 0.0 kWh
Valid meter number
Token: 0273 4974 9352 5004 2045
Meter number: 04123456789
Owner: Lerato Dlamini (Subsidised)
Tariff: R3.12 per kWh
Units available: 70.5 kWh
NOTE: The token may differ due to the nature of random numbers.
(9)
• Enter your examination number as a comment in the first line of the object class and the
form class.
• Save your program.
• Print the code in the object class and the form class if required.
TOTAL SECTION C: 40
Copyright reserved Please turn over
Information Technology/P1 23 Hlayiso/Mock 2026
NSC Mock
SECTION D
QUESTION 4: PROBLEM-SOLVING PROGRAMMING
A small theatre in Johannesburg has 8 rows of seats (A to H) with 12 seats in each row. The
theatre needs a program to manage the bookings for a show.
Do the following:
• Open the incomplete program in the Question 4 folder.
• Enter your examination number as a comment in the first line of the Question4_U.pas file.
• Compile and execute the program. The program has limited functionality currently.
Example of the graphical user interface (GUI):
Question 4 - Problem solving – □ ×
Seat plan
1 2 3 4 5 6 7 8 9 10 11 12 4.1 - Row summary Reset seat plan
A X X X X X X . X X X X X
B X X . . X X X X . X X X
C X X X . X X X . . X X X Seats required: 4
D X . . X X . . . X X X X
E X X . . . . . X X X X . 4.2 - Group booking
F X . . . . X X . . X X X
G . . . . . . . . . . . .
H . . X X . . . . . . . . 4.3 - Sort shows
Output
Copyright reserved Please turn over
Information Technology/P1 24 Hlayiso/Mock 2026
NSC Mock
The following have been provided in the program:
• A two-dimensional array called arrSeats with 8 rows and 12 columns that stores the seat
plan of the theatre. Each element contains the character ’X’ if the seat has been booked or
the character ’.’ if the seat is available. The array is populated by the provided procedure
loadSeats.
arrSeats: array [1 .. ROWS, 1 .. COLS] of Char;
• The constants ROWS = 8 and COLS = 12, and a string constant ROW_LETTERS =
’ABCDEFGH’ that contains the letter of each row, for example ROW_LETTERS[3] is ’C’.
• A procedure called display2D that displays the content of the array arrSeats in the rich
edit redQ4.
• Two parallel arrays, arrShows and arrTickets, that store the names of six shows staged
at the theatre this year and the number of tickets sold for each show.
arrShows: array [1 .. 6] of String = ('Kasi Dreams',
'Umoya', 'The Last Taxi', 'Jozi Nights', 'Mama Africa',
'Rhythm of the Drum');
arrTickets: array [1 .. 6] of Integer = (1240, 3875, 2190, 2964,
845, 3102);
• A button [Reset seat plan] that restores the original seat plan.
Complete the code for each section of QUESTION 4, as described in QUESTION 4.1 to
QUESTION 4.3 below.
Copyright reserved Please turn over
Information Technology/P1 25 Hlayiso/Mock 2026
NSC Mock
4.1 Button [4.1 - Row summary]
Code has been provided to clear the memo memQ4 and to display the
headings.
Write code to do the following:
• Determine the number of booked seats in each row and display the row
letter and the number of booked seats in the memo memQ4, as shown in
the example below.
• Calculate the occupancy of the theatre, i.e. the total number of booked
seats as a percentage of the total number of seats. Display the occupancy
formatted to ONE decimal place.
• Calculate and display the total income from the booked seats in currency
format. Seats in rows A to C cost R180 each and seats in rows D to H cost
R120 each.
Example of output for the original seat plan:
Row Booked
A 11
B 9
C 9
D 7
E 6
F 6
G 0
H 2
Occupancy: 52.1%
Income: R 7740.00
(9)
Copyright reserved Please turn over
Information Technology/P1 26 Hlayiso/Mock 2026
NSC Mock
4.2 Button [4.2 - Group booking]
A group of people who want to sit next to each other in the same row must
be accommodated. The number of seats required must be selected from the
spin edit spnQ4_2.
Write code to do the following:
• Search the rows from row A to row H, and in each row from seat 1 to seat
12, for the FIRST position where the required number of available seats
(’.’) are next to each other in the same row.
• If such a position is found:
o Book the seats by changing each of the seats to ’X’ in the array
arrSeats.
o Display the row letter and the first and last seat numbers of the booking
in the memo memQ4 in the following format:
Booked: row <row letter>, seats <first seat> to <last
seat>
o Call the display2D procedure to display the updated seat plan.
• If no such position is found, display a suitable message in the memo
memQ4.
Example of input and output if 4 seats were required for the original seat plan:
1 2 3 4 5 6 7 8 9 10 11 12
A X X X X X X . X X X X X
B X X . . X X X X . X X X
C X X X . X X X . . X X X
D X . . X X . . . X X X X
E X X X X X X . X X X X .
F X . . . . X X . . X X X
G . . . . . . . . . . . .
H . . X X . . . . . . . .
Booked: row E, seats 3 to 6
Example of output if 12 seats were required for the original seat plan:
No row has 12 available seats next to each other
(12)
Copyright reserved Please turn over
Information Technology/P1 27 Hlayiso/Mock 2026
NSC Mock
4.3 Button [4.3 - Sort shows]
Code has been provided to clear the memo memQ4 and to display the
headings.
Write code to sort the parallel arrays arrShows and arrTickets from the
highest number of tickets sold to the lowest number of tickets sold. Display
the name of each show and the number of tickets sold in the memo memQ4.
Example of output:
Show Tickets sold
Umoya 3875
Rhythm of the Drum 3102
Jozi Nights 2964
The Last Taxi 2190
Kasi Dreams 1240
Mama Africa 845
(9)
• Enter your examination number as a comment in the first line of the program file.
• Save your program.
• Print the code if required.
TOTAL SECTION D: 30
GRAND TOTAL: 150
Copyright reserved
Information Technology/P1 1 Hlayiso/Mock 2026
NSC Mock
INFORMATION TECHNOLOGY P1
DATABASE INFORMATION FOR QUESTION 2:
The design of the database tables is as follows:
Table: tblShelters
This table contains the details of each shelter.
Field name Data type Description
ShelterID (PK) Number A unique number that identifies a shelter
ShelterName Text (30) The name of the shelter
Town Text (20) The town or city where the shelter is located
Province Text (15) The province where the shelter is located
Capacity Number The maximum number of animals that the shelter is
designed to house
ContactNumber Text (10) The telephone number of the shelter
Example of the records of the tblShelters table:
ShelterID ShelterName Town Province Capacity ContactNumber
1 Paws Haven Bellville Western Cape 6 0219483310
2 Second Chance Shelter Soweto Gauteng 8 0119382245
3 Ubuntu Animal Rescue Durban KwaZulu-Natal 5 0313047782
4 Karoo Kennels Beaufort West Western Cape 4 0234158890
5 Highveld Animal Haven Pretoria Gauteng 7 0123316604
6 Lowveld Pet Rescue Mbombela Mpumalanga 4 0137520918
7 Coastal Critter Care Gqeberha Eastern Cape 6 0413649921
8 Mangaung Pet Shelter Bloemfontein Free State 5 0514470036
Table: tblAnimals
This table contains information about the animals at the shelters.
Field name Data type Description
AnimalID (PK) AutoNumber A unique number that identifies an animal
AnimalName Text (15) The name of the animal
Species Text (10) The species of the animal (Dog, Cat or Rabbit)
Breed Text (20) The breed of the animal
DateArrived Date/Time The date on which the animal arrived at the shelter
Weight Number The weight of the animal in kg
AdoptionFee Currency The fee payable to adopt the animal
Sterilised Yes/No True if the animal has been sterilised, otherwise False
ShelterID (FK) Number The ID of the shelter where the animal is housed
Copyright reserved Please turn over
Information Technology/P1 2 Hlayiso/Mock 2026
NSC Mock
Example of the first ten records of the tblAnimals table:
AnimalID AnimalName Species Breed DateArrived Weight AdoptionFee Sterilised ShelterID
1 Bella Dog Labrador mix 2025/03/14 24.5 R950.00 True 1
2 Simba Cat Domestic shorthair 2025/11/02 4.2 R650.00 True 2
3 Rocky Dog Boerboel 2024/12/20 58.0 R1 200.00 False 2
4 Luna Cat Siamese 2026/01/09 3.6 R700.00 True 3
5 Max Dog Jack Russell 2025/07/30 7.8 R850.00 True 5
6 Coco Rabbit Lop-eared 2026/02/17 2.1 R300.00 False 1
7 Duke Dog Rottweiler 2025/05/05 45.3 R1 100.00 True 6
8 Nala Cat Domestic longhair 2025/09/21 4.9 R650.00 False 2
9 Tumi Dog Africanis 2026/03/03 19.4 R800.00 True 4
10 Oreo Rabbit Dutch 2025/10/11 1.8 R300.00 True 7
NOTE:
• Connection code has been provided.
• The format of the dates displayed may differ depending on the date settings on your
computer.
The following one-to-many relationship with referential integrity exists between the two tables
in the database:
tblShelters tblAnimals
ShelterID 1 AnimalID
ShelterName AnimalName
Town Species
Province Breed
Capacity DateArrived
ContactNumber Weight
AdoptionFee
∞ Sterilised
ShelterID
Copyright reserved Please turn over
Information Technology/P1 Hlayiso/Mock 2026
PLANNING PAGE 1
Copyright reserved
Information Technology/P1 Hlayiso/Mock 2026
PLANNING PAGE 2
Copyright reserved
Information Technology/P1 Hlayiso/Mock 2026
Examination sticker
150
INFORMATION TECHNOLOGY P1 – MOCK EXAMINATION 2026
INFORMATION SHEET (to be completed by the candidate AFTER the 3-hour examination
session)
CENTRE NUMBER
EXAMINATION NUMBER
WORK STATION NUMBER
Version of Delphi used during the examination (mark the appropriate box with a cross (X)):
Delphi 10 Delphi XE Delphi 10.3 Community Delphi 11 Delphi 12 Other (specify):
FOLDER NAME
Candidate must enter the file name(s) used for each answer. Tick if saved and/or attempted.
Question File name Saved Attempted Maximum Mark Marker
number (✓) (✓) mark achieved initial
1 Question1_P.dproj 40
2 Question2_P.dproj 40
Meter_U.pas 19
3
Question3_P.dproj 21
4 Question4_P.dproj 30
TOTAL 150
Comment (for office/marker use only):
Copyright reserved
Study this subject
Recommended for this subject

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 P1 NSC June 2025 Memo (Eng)

Memorandum
Information Technology Grade 12 P1 2024 Memo (Eng)

Memorandum
Information Technology Grade 12 P1 2022 Memo (Eng)
More from Grade 12 Information Technology

Memorandum
Information Technology Grade 12 P2 2024 Memo (Eng)

Memorandum
Information Technology Grade 12 P2 2023 Memo (Eng)

Memorandum
Information Technology Grade 12 P1 NSC June 2023 Memo (Eng)

Question paper
Information Technology Grade 12 P2 Eastern Cape Mock 2022 QP
_hlayiso.com_--7454979b-cba2-4b39-a884-69e6b1c0f5c6/v1-3f9dc1675d92ae7768e5/card.webp)
Question paper
Information Technology Grade 12 P2 NSC June 2022 QP (Eng)
_hlayiso.com_--500d3219-d02f-4c1c-af0e-452a5fe87f3b/v1-bfe5f3f664d3f236ff89/card.webp)
Question paper