Downloaded from hlayiso.com
PRELIMINARY EXAMINATION
GRADE 12
INFORMATION TECHNOLOGY P1
AUGUST 2021
MARKS: 150
TIME: 3 hours
Skip to contentAll 2021 papers 





View all





Information Technology Grade 12 GAU Prelim 2021 QP
Grade 12 Information Technology question paper from the GAU Prelim 2021, 22 pages. Read online or get the free PDF download, memo linked when available.
Information Technology · Grade 12 · GAU Prelim · 2021. Question paper, 22 pages. Read online or download the PDF.
- Subject
- Information Technology
- Grade
- Grade 12
- Document type
- Question paper
- Year
- 2021
- Exam period
- GAU Prelim
- Curriculum
- CAPS
- Pages
- 22
- File size
- 1.6 MB
Free to read online, no sign-up needed
Loading document…
Loading document…
1 of 22
This exam
GAU Prelim 2021
- Paper 2Question paperMemo
- Other filesQuestion paperMemo
Document textSearch extracted text and jump to a page.
Downloaded from hlayiso.com
Information Technology/P1 2 Preliminary Examination 2021
This question paper consists of 22 pages and 2 data pages.
INSTRUCTIONS AND INFORMATION
1. This question paper is divided into FOUR sections. Candidates must answer ALL
the questions in ALL FOUR sections.
2. 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.
3. This question paper is set with programming terms that are specific to the Delphi
programming language.
4. Ensure that you answer the questions according to the specifications that are given
in each question. Marks will be awarded according to the set requirements.
5. 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.
6. 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.
7. Routines, such as search, sort, and selection, must be developed from first
principles. You may NOT use the built-in features of Delphi for any of these
routines.
8. All data structures must be defined by you, the programmer, unless the data
structures are supplied.
9. You must save your work regularly on the CD/DVD/flash disk you have been given,
or on the disk space allocated to you for this examination session.
10. Make sure that your name and surname appears as a comment in every program
that you code, as well as on every event indicated.
11. If required, print the programming code of all the programs/classes that you
completed. You will be given half an hour printing time after the examination
session.
12. At the end of this examination session you must hand in a 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.
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 3 Preliminary Examination 2021
13. The files that you need to complete this question paper have been given to you on
the CD/DVD/flash disk or on the disk space allocated to you. The files are provided
in the form of password-protected executable files
NOTE: Candidates must use the file DataPrelim2021.exe.
Do the following:
• Double click on the password-protected executable file.
• Click on the extract button.
• Enter the following password: S@nb!2021NGO
Once extracted, the following list of files will be available in the folder
DataSept2021:
SUPPLIED FILES:
Question 1: Question 3:
Question1_u.pas Question3_u.pas
Question1_u.dfm Question3_u.dfm
Question1_p.res Question3_p.res
Question1_p.dproj Question3_p.dproj
Question1_p.dpr Question3_p.dpr
GreenBicycle.jpg Question3_p.dpr
clsCarWash_u.pas
Question 4:
Question 2:
Question4_U.pas
ConnectDB_U.pas Question4_U.dfm
Question2_P.dpr Question4_P.res
Question2_P.dproj Question4_P.dproj
Question2_P.res Question4_P.dpr
Question2_U.dfm
Question2_U.pas
Ship.ico
VolunteersDB.mdb
VolunteersDB_Backup.mdb
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 4 Preliminary Examination 2021
SECTION A
QUESTION 1: GENERAL PROGRAMMING SKILLS
SCENARIO:
'BreadCycling' is a business that delivers bread to your door. Instead of the customer going to
buy bread at the store. The purpose of this company is to sell the bread at normal bread prices
and charge a delivery fee of R5.
Do the following:
• Open the incomplete project file Question1_p in the Question 1 folder.
• Enter your name and surname as a comment in the first line of the Question1_u file.
Compile and execute the program. The program currently has no functionality. The following
user interface is displayed when the program is executed:
Complete the code for each section of Question 1, as described in Question 1.1 to Question 1.3
that follows.
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 5 Preliminary Examination 2021
The following form variables have already been declared:
sOrderNumber: string; // the order number
rAmountPay: real; // the amount to be paid
iCountCustomers: integer; // the number of customers
rTotalAmount: real; // the total amount collected for the day
sName: string = 'BreadCycling'; // the name of the business
1.1 BUTTON [Place Order]
A customer must enter his personal details to register for bread delivery. The contact
number is mandatory.
Write Delphi code to do the following:
1.1.1 Test whether the user has entered a contact number.
• Extract the contact number from the given component if the contact
number has been entered.
• If the contact number has not been entered, an appropriate message
must be displayed AND the focus must be placed on the edtContact
component. (5)
1.1.2 a) Declare constants for the bread prices:
Best of Both: R13.75
Superior Bread (white or brown): R15.50
Ultima Seeded: R17.50
b) Determine the cost for the order according to the type of bread
selected from the combo box.
c) Extract the number of loaves ordered from the given component.
d) Calculate the amount to be paid (rAmountPay) for an order using the
following formula:
Amount payable = Type of bread price x Quantity of bread + R5 for delivery. (9)
1.1.3 Determine a check digit (iControlNumber) by calculating the sum of all the
digits in the even positions of the contact number. Divide the sum by 11
(eleven) and round the answer down to the closest integer.
E.g. If the contact number is 0829612852, the check digit will be calculated
as follows: (8 + 9 + 1 + 8 + 2) / 11 = 28/11 = 2. (7)
1.1.4 Generate an order number as follows:
• The first two characters of the business name (sName) in lower case.
• The value of the check digit stored in iControlNumber.
• The '/' symbol.
• The system date on which the order was received. (7)
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 6 Preliminary Examination 2021
1.1.5 a) Display the order number in the edtOrderNumber component.
b) Displays the amount payable in the edtPay component as a currency
with two decimal places.
c) Change the colour of the gbxRegister from red to green.
d) Change the picture of the man on the bike imgCourier to the picture
named GreenBicycle.jpg. (6)
Example of display:
1.2 BUTTON [Next Order]
1.2.1 Make the gbxAdmin group box visible. (1)
1.2.2 Add the amount of the new order to be paid to the value of the
rTotalAmount variable. (1)
1.2.3 Increment the number of client variables (iCountCustomers) by 1. (1)
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 7 Preliminary Examination 2021
1.3 BUTTON [Admin]
Display the following information in the redOutput component:
• The total amount of money received for the day.
• The total number of customers / deliveries for the day.
Example of output after the first customer’s delivery of 3 Superior Bread
White/Brown loaves:
Example of output after the second customer’s delivery of 5 Ultima Seeded loaves:
3)
TOTAL SECTION A: 40
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 8 Preliminary Examination 2021
SECTION B
QUESTION 2: SQL and DATABASE PROGRAMMING
‘Mercy Ships’ is a non-profit organisation that uses hospital ships to deliver free healthcare services
to those who don’t have proper access to healthcare, in different parts of the world.
The ships that the organisation uses are crewed by volunteers who represent over 60 nations, with
an average of over 1200 volunteers each year. Professionals including dentists, nurses, teachers,
cooks, engineers and many others donate their time and skills.
The VolunteersDB.mdb database contains information about the different volunteer positions that
are available on the Mercy Ships.
The data pages attached at the end of this question paper provide information on the design
of the database and the content of the tables.
Do the following:
● Open the incomplete Question2_p.dpr program in the folder Question 2.
● Enter your name and surname as a comment on the first line of the Question2_u.pas
file.
● Compile and execute the program. The program currently has no functionality.
● Complete the code for each question as described in QUESTION 2.1 and QUESTION
2.2.
NOTE:
● Code to connect with the Access database has been provided – do not change
any given code.
● Question 2.2 will make use of the ADOTables tblShips and tblJobs. These
tables have been declared as global variables as shown below.
● You can click the Restore button once to restore the database to its original state.
2.1 TAB SHEET [Q2.1 – SQL]
Complete the SQL code to meet the requirements specified in QUESTION 2.1.1 to
QUESTION 2.1.5.
NOTE: Insert your SQL instruction in the provided code between the ‘ ‘. Code
has been provided to execute the SQL instruction.
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 9 Preliminary Examination 2021
2.1.1 BUTTON [2.1.1 – List of jobs]
Display ALL the data of volunteer jobs in the tblJobs table, sorted
according to the job field and secondly according to number of months
(Period field), in descending order.
Example of the output of the first few records:
(4)
2.1.2 BUTTON [2.1.2 – Surgeons]
Display the Job and Startdate for all surgeon volunteer jobs in the table
tbljobs.
Example of the output for first few records:
(4)
2.1.3 BUTTON [2.1.3 – Ships start 30 July 2022]
Display the ship, country and job for all volunteer jobs that start on 30 July
2022.
Example of the output for first few records:
(4)
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 10 Preliminary Examination 2021
2.1.4 BUTTON [2.1.4 – Average per Department]
Display the average number of months of volunteer service (Period field)
for each department. Display the months, to the nearest integer, with an
appropriate heading
Example of the output for first few records:
(4)
2.1.5 BUTTON [2.1.5 – Total Allowance]
The allowance field contains the amount, in Dollars, that a volunteer will be
paid per month for living expenses such as food and toiletries.
Calculate and display how much, in Rand, a volunteer would be given in
total over the full period that they volunteer, if they volunteered for the
Marine Deck department. Use the exchange rate of $1 = R14.09
Display the Job and the calculated field using the field name Rands,
formatted as currency.
Example of the output for first few records:
(4)
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 11 Preliminary Examination 2021
2.2 DATABASE MANIPULATION
TAB SHEET [Q2.2 ADO Tables]
Select the tab sheet, which displays the following GUI when executed:
NOTE:
• The use of the filter-, sort- and locate- methods will not earn any marks. Write all
code from first principles.
• NO marks will be allocated for the use of SQL statements in QUESTION 2.2.
• The names of the tables to be used in your code are tblShips and tblJobs.
Complete the code to meet the requirements specified in QUESTION 2.2.1 to
QUESTION 2.2.3.
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 12 Preliminary Examination 2021
2.2.1 BUTTON [2.2.1 - Crew Capacity]
Write code to do the following:
• Allow the user to select a ship’s name (Ship) in the tblShips DBGrid.
• Count the number of volunteer jobs that exist in tblJobs for the ship
selected in the tblShips DBGrid. (a record with the ship’s ID indicates
that the job is on that ship)
• Determine whether the selected ship has enough Crew Capacity for all
the jobs.
• If the ship has enough capacity, display the number of jobs with a
suitable message, in the richedit redQ2.
• If the ship does not have enough capacity, display a message stating
this in redQ2.
Example of the message if Atlantic Mercy is the active record and it has
enough capacity:
Example of the message if Caribbean Mercy is selected thereafter and it
does not have enough capacity:
(12)
2.2.2 BUTTON [Q2.2.2 – Delete position]
Write code to do the following
Delete the last record in tblJobs.
Example of the last few records in the tblJobs table which shows that the
last record has been deleted from the table:
(2)
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 13 Preliminary Examination 2021
2.2.3 BUTTON [Q2.2.3 – Add new position]
Write code to do the following:
Add a new volunteer position to tblJobs according to the following
information:
Job: Deck Hand
Department: Marine Deck
Ship: the current active record in the tblShips table
Period: 12
Allowance: 150
Startdate: 1 year from the date the program is executed.
NOTE: The information that needs to be added to the table has been
provided as comments in the code.
Example of the last few records in the tblJobs table which shows that the
record has been added to the table successfully:
NOTE: The ID may be different depending on how many changes have
been made to the table, and the date will also be different from the
example. (6)
TOTAL SECTION B: 40
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 14 Preliminary Examination 2021
SECTION C
QUESTION 3: OBJECT ORIENTED PROGRAMMING
SCENARIO: A non-profit NGO named Wishy Washy needs your help in completing a
program that focuses on raising funds for a school. This NGO assists any volunteers
of a school with car wash projects.
Do the following:
● Open the incomplete Question3_p program in the folder Question 3.
● Open the incomplete class unit clsCarWash_u in the folder Question 3.
● Enter your name and surname as a comment on the first line of the Question3_u.pas
and the clsCarWash_u.pas.
● Compile and execute the program. The program currently has limited functionality.
The following user interface is displayed with limited functionality:
NOTE:
● Do not remove any of the comments given in the class or main form units unless instructed
to do so.
● Do not change any of the given code in the class or main form unit.
● Do not add any other methods than those asked in this question.
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 15 Preliminary Examination 2021
3.1 The provided incomplete object class (TCarWash) contains the declaration of TWO
attributes which describe a CarWash object.
The attributes for a CarWash object class have been declared as follows:
● fCarType – the type of vehicle the customer has e.g. Car, Bakkie or Truck.
● fWashType – a zero, one or two for the type of car wash the customer needs
e.g. Quick wash; wash and vacuum or wash, vacuum and tyre shine.
The following methods have been provided:
● StartingWashPrice – Basic starting fee for a car wash based on the type of
vehicle.
● CalcWashType – Returns the result of a type of wash (Quick wash; Wash
and vacuum or Wash, vacuum and tyre shine).
● ValidRegistration – An auxiliary method which returns a boolean result
indicating whether or not a vehicle registration number is valid or not (must
have 8 characters with the last two digits representing one of the 9 provinces
of SA).
● ToString – used to provide output of all attributes of the object. NOTE: NOT
COMPLETED!
Complete the code in the object class (clsCarWash_u) as described in
QUESTION 3.1.1 to QUESTION 3.1.5.
3.1.1 Add an attribute called fCarReg. This attribute will contain a vehicle
registration number (for example ‘FP49FCGP’)
(2)
3.1.2 Declare and complete a constructor method called CREATE which will
assign the car and wash type parameters to the relevant attributes. Assign
an empty string to the car registration attribute. (3)
3.1.3 Write a mutator method called setRegistration, which will receive the
vehicle registration number as a string attribute and assign it to the relevant
attribute. (3)
3.1.4 An incomplete auxiliary method called DetermineCost has been provided.
Study the following table.
Quick Wash and Wash, vacuum &
wash vacuum tyre shine
Car R40.00 R40.00 + R20 = R40.00 + R40 =
R60.00 R80.00
Bakkie R50.00 R50.00 + R20 = R50.00 + R40 =
R70.00 R90.00
Truck R80.00 R80.00 + R20 = R80.00 + R40 =
R100.00 R120.00
Write code for this method in order to determine the cost for any given car
wash.
NOTE: Make use of the StartingWashPrice auxiliary method
supplied in the class unit. (3)
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 16 Preliminary Examination 2021
3.1.5 Complete the ToString method in order to provide the following structured
output:
Wash Type: <CalcWashType>
Car Type: <CarType>
Registration: <CarReg> <(Valid/Invalid)>
Cost: <DetermineCost>
NOTE: Make use of the ValidRegistration method within your
ToString method in order to provide the validity after the
vehicle registration number was provided.
Remove the two commented lines as indicated in the
ValidRegistration method.
(5)
3.2 An incomplete program has been supplied in the Question3 folder. The program
contains code for the object class to be accessible and declares, with class scope,
an object variable called objCarWash.
Write code to perform the tasks described in QUESTION 3.2.1 and QUESTION
3.2.2.
3.2.1 BUTTON [Question 3.2.1]
Code has been provided to ensure that the user chooses an option from
the combobox (cbxCarType).
Write code to do the following:
● Clear the component called redDisplay.
● Instantiate the objCarWash object variable with the associating input
values from the radiogroup and combobox components provided.
● Make use of the input from the user for the vehicle registration and call
the mutator method, setRegistration, for the registration number.
Note that there are no spaces in a registration number.
● Call the ToString method and display a car wash session’s information
in redDisplay.
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 17 Preliminary Examination 2021
EXAMPLE of correct outputs:
(6)
3.2.2 BUTTON [Question 3.2.2]
A text file with car wash data for the Gauteng High School has been
recorded in Gauteng.txt with the following structure:
<Name of learner>#<CarTypeOptionDigit><WashOptionDigit>#<CO><WO>#...
For example: Thandi#11#12#13#11#11#13#11#12#13#22#11#11#
Description of information
Name of learner: Thandi
First wash: Car Type 1 (Car) with Wash Type 1 (Quick wash)
Second wash: Car Type 1 (Car) with Wash Type 2 (Wash &
vacuum)
And so on…
NOTE: Some learners wash more cars/bakkies/trucks than others!
Write code to do the following:
● Add code to test whether Gauteng.txt exists. If it does not, ensure
code is added to show a suitable message and terminate the
program. (3)
● Read through the file and do the necessary text file processing to
extract the name of each learner followed by their car type(s) and (6)
wash type(s).
● Use these extracted values to instantiate a car wash object for each
car type and wash within a structured loop until each learner has no (3)
more car wash entries (separated by #) left.
● Make use of existing methods to determine the total income each
(1)
learner generates from washing these cars.
● Write code in to display each learner’s name followed by their total
earnings for washing their own number of vehicles in redResults. (2)
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 18 Preliminary Examination 2021
● Finally, add code in order to determine and display the following: (3)
o The TOTAL FUNDS RAISED.
o TOP PERFORMER’s name with most funds raised.
TOTAL SECTION C: 40
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 19 Preliminary Examination 2021
SECTION D
QUESTION 4: PROBLEM-SOLVING PROGRAMMING
SCENARIO:
Somebody collected raw financial data from six NPO’s (Non Profit Organisations), in terms of
their budget allocations to salaries, operational costs and actual pay-out to the beneficiaries.
He needs your help to process and display the data and info.
Do the following:
● Open the incomplete program in your Question4_p in your Question 4
folder.
● Enter your name and surname as a comment in line 1 of the
Question4_u.pas file.
● Compile and execute the program. The program currently has no functionality
● Complete the code for this program as required in Questions 4.1 to 4.2 below.
● Where applicable, please use the variables iRow and iCol as array indexes.
Three globally / form declared arrays are given:
arrNGOs : the names of the six NPO’s being investigated
arrBudget : captions for five budget posts (R Salaries, R OpCosts,
R Beneficiary, R Total and % to Benef)
arrData: raw financial data for salaries, operational costs and amount
allocated to beneficiaries, as collected for each NPO
4.1 BUTTON [4.1 - Display budget]
Write code to display the budget information for the six NPO’s in matrix format as
shown below.
(7)
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 20 Preliminary Examination 2021
4.2 BUTTON [4.2 – Calculations] Button
• Calculate and display the total budget for each NPO by adding the Salaries,
Opcosts and Amount for each Beneficiary.
• Calculate the % for Benef. with the following formula and store it in the provided
array arrPerc and display the values in the stringrid: (9)
Beneficiary amount / Budget Total *100
4.3 BUTTON [4.3 – Report]
Write code to determine and display the following in the redReport component::
● The average % that the six NPO’s spent on beneficiaries (% to Benef.) (6)
● The name of the NPO which donated the highest percentage of its budget to
beneficiaries. (4)
● The number of NPO’s where the % to Benef is higher than the NPOs’ average
percentage. (4)
TOTAL SECTION D: [30]
GRAND TOTAL: 150
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 Addendum A Preliminary Examination 2021
QUESTION 2: DATABASE INFORMATION
DESIGN OF DATABASE TABLES:
The records contained in tblShips consist of the following fields:
● ID – a unique field with six-character identification code (text data type) which is the
primary key (PK)
● Ship – Name of the ship (text data type)
● CrewCapacity – Number of crew members the ship can accommodate (integer data
type)
● Captain – Name of ship’s captain (text data type)
● Port – Name of the port that the ship docks at (text data type)
● Country – The country in which the port is located (text data type)
Example of data from tblShips table:
The records contained in tblJobs consist of the following fields:
● ID – unique index code for each volunteer job listing (autonumber data type) starting
from 1 (PK)
● Job – Job description (text data type)
● Department – Division of the ship that the job falls into (text data type)
● ShipID – Six-character identification code (text data type) which is the foreign key (FK)
reference to tblShips
● Period – Length of time in months that the volunteer needs to be available for the job
(integer data type)
● Allowance – Monthly living allowance paid for the position in Dollars (currency data
type)
● Startdate – Date that the volunteer position starts (Date/Time data type)
Please turn over
Downloaded from hlayiso.com
Information Technology/P1 Addendum A Preliminary Examination 2021
Example of data from tblJobs table:
The ID field in tblships has been used to link to tblJobs using the ShipID field.
Last page
Study this subject
Recommended for this subject

Question paper
Information Technology Grade 12 P2 GAU Prelim 2021 QP

Memorandum
Information Technology Grade 12 Paper 2 GAU Prelim 2021 Memo

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

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

Question paper
Information Technology Grade 12 P1 NSC November 2021 QP

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

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 P2 2024 Memo (Eng)

Memorandum
Information Technology Grade 12 P1 2023 Memo (Afr)

Memorandum
Information Technology Grade 12 P2 2023 Memo (Afr)

Memorandum