Downloaded from hlayiso.com
NASIONAL
SENIOR CERTIFICATE
GRADE 12
Information Technology PAPER 1
(Practical)
PREPARATORY EXAMINATION 2020
VRAESTEL 1
MARKS: 150 TIME: 3 HOURS
THIS PAPER CONSIST OF 18 PAGES
Skip to contentAll 2020 papers 





View all





Information Technology Grade 12 P1 FS Prelim 2020 QP (Eng)
Grade 12 Information Technology Paper 1 question paper from the FS Prelim 2020 (English), 18 pages. Read online or download the free PDF.
Information Technology · Grade 12 · FS Prelim · 2020 · English. Question paper, 18 pages. Read online or download the PDF.
- Subject
- Information Technology
- Grade
- Grade 12
- Language
- English
- Document type
- Question paper
- Year
- 2020
- Exam period
- FS Prelim
- Paper
- 1
- Curriculum
- CAPS
- Pages
- 18
- File size
- 1012.6 KB
Free to read online, no sign-up needed
Loading document…
Loading document…
1 of 18
This exam
FS Prelim 2020
- Paper 1Question paperMemo
- Paper 2Memo
Questions in this paper
Document textSearch extracted text and jump to a page.
Downloaded from hlayiso.com
Information Technology /P1 FS Sept 2020
INSTRUCTIONS AND INFORMATION
1. This paper is divided into FOUR sections. Candidates must answer ALL the
questions from 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. Make sure that you answer only what is asked in the questions according to the
specifications that are given in each question. Marks will be awarded according
to the set requirements.
4. Your programs must be coded with Delphi 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.
IMPORTANT: Sample data is displayed in Afrikaans and English. You may
only display the English output.
5. 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, e.g. “FILTER, LOCATE, Loadfromfile”.
All data structures must be defined by you, the programmer, unless the data
structures are supplied.
6. You must save your work regularly on the disk/flash disk you have been given,
or on the disk space allocated to you for this examination session.
Make sure that your Name and Surname appears as a comment in every
program that you code, as well as on every event indicated.
7. Printing of code is optional. If needed, your Name and Surname must appear
on all the printouts. An hour printing time after the examination session will be
allowed.
8. At end of this examination session, hand in your disk / flash disk with all your
work saved on it OR make sure that all your work has been saved on the disk
space allocated to you. Ensure that all files can be read.
9. The files that you need to complete this question paper have been provided to
you on the disk/flash disk or on the disk space allocated to you. The following list
of files will be available in the folder Data2020:
Question1 Question3:
Question2: Question4:
1 Please turn over
Downloaded from hlayiso.com
Information Technology /P1 FS Sept 2020
SCENARIO
As grade 12 learner, there are certain required algorithms that you need to know. There are also
some programming techniques like OOP and data structures such as arrays and databases that
you need to master. Throughout the paper that knowledge will be tested.
SECTION A
QUESTION 1: GENERAL PROGRAMMING SKILLS
This question will test a variety of general programming skills.
Do the following:
• Compile and run the program found in the QuestionVraag1 folder.
• The user interface displays FOUR different parts (Tab Sheets) named
Quest_Vraag 1_1 to Quest_Vraag 1_4.
• The program currently has no functionality.
Example of graphical user interface (GUI) on the next page:
• Complete the code for each section of QUESTION 1, as described in QUESTION
1.1 to QUESTION 1.4.
2 Please turn over
Downloaded from hlayiso.com
Information Technology /P1 FS Sept 2020
1.1 Tab Sheet [ Quest_Vraag 1_1]
Button [1.1]
Write code to:
• Change the colour of the panel to any colour of your choice.
• Change the font size of the panel to 16.
• Display the correct image. There is a possibility of four different pictures.
▪ Get input from the "SpinEdit". Enter the number 1, 2, 3 or 4 in the
“Spinedit”.
▪ Do data validation on this input and test that only the number 1, 2, 3
or 4 is entered.
▪ Display a suitable message if any other number is entered.
▪ Return the value of the "SpinEdit" to zero.
▪ Stop any further processing.
• If the input is correct, the correct image must be displayed. E.g. If 4 is given
as input, the picture with the four computers must be displayed, if 3 is given
as input, the picture with the 3 computers must be displayed, etc.
Write code to ensure the image is fully visible.
Example output if 2 is entered as input:
Example output if ANY other number than 1, 2, 3 or 4 is entered in the "SpinEdit":
NOTE: English learners can only display the English message. (10)
3 Please turn over
Downloaded from hlayiso.com
Information Technology /P1 FS Sept 2020
1.2 Tab Sheet [ Quest_Vraag 1_2]
Button [1.2]
When you have a person's date of birth, you should be able to determine the
person's age.
A person's day, month and year of birth are entered in the "Editbox" in the
format: dd/mm/yyyy
Write code to do the following:
• Use date function/s to extract the current month and year as well as the
birth month and year.
• Then use this information to determine the person's age in terms of
years.
• If the person has not yet had his/her birthday this year, the current age
must be calculated correctly.
• You only need to test if the month in which the person's birthday is, is not
yet reached.
• Display your answer in the “Editbox”.
Example output if the person was born on the 13th October 2001.
Example output if the person was born on the 13th May 2001.
(10)
4 Please turn over
Downloaded from hlayiso.com
Information Technology /P1 FS Sept 2020
1.3 Tab Sheet [ Quest_Vraag 1_3]
Button [1.3]
You must write code to convert any binary number to the correct decimal value.
Obtain the input from the “Editbox”.
• Do data validation to ensure that this number only consists of ONE’s and
ZERO’s.
• If it is a binary number, you can use the following algorithm to complete
your code.
- Repeat the steps for the length of the binary number.
- Answer Answer x 2 + Binary Number [iK]
// where iK is the 1st, 2nd etc. digit of the binary number.
• Otherwise, an appropriate message appears and stops any further
processing.
• Display the decimal number in the “Label”.
Example output if the binary number entered is 1100111:
(10)
Example output if incorrect number is entered:
NOTE: English learners can only display the English message.
5 Please turn over
Downloaded from hlayiso.com
Information Technology /P1 FS Sept 2020
1.4 Tab Sheet [ Quest_Vraag 1_4]
Button [1.4]
The Greatest Common Divisor (g) is the largest natural number that
divides both a and b without leaving a remainder (the largest factor, which
is the same, that can divide into two numbers). You must write a program
that determines the GCD of two numbers.
Convert Euclid's algorithm below to Delphi code:
Algorithm:
Get Number 1
Get Number 2
While Number 2's value is not zero, repeat:
Divide Number 1 by Number 2 and assign the rest to a third variable
Number 1 gets the value of Number 2
Number 2 gets the value of the third variable
Greatest Common Divisor gets the value of Number 1
Display the Greatest Common Divisor.
Example output if numbers 112 and 64 are entered as input
NOTE: English learners can only display the English message.
(8)
Enter your SURNAME and NAME as a comment in the first line of the program
file.
Save your program and code
TOTAL SECTION A: 38
6 Please turn over
Downloaded from hlayiso.com
Information Technology /P1 FS Sept 2020
SECTION B
QUESTION 2: SQL AND DATABASE
The school will take the learners on an outing. The information is stored in a database
Excursion.accdb.
The Excursion.accdb database contains two tables named tblActivity and tblLearner.
PLEASE NOTE:
• The page with data, attached at the end of this paper provides information
about the design of the database and examples of the contents of the tables.
• The date format may be displayed differently by your computer due to the
regional settings of your computer.
• Connection code is provided.
• The database is password protected. You will therefore not be able to
access the database directly.
Do the following:
• Compile and run the program in the QuestionVraag2 folder. The program
has limited functionality.
• Complete the code for each question as described in Quest_Vraag 2.1 and
Quest_Vraag 2.2.
The program provides a GUI with two tab sheets: ts2_1SQL and ts2.2DB.
2.1 SQL
Select tab sheet Quest_Vraag 2.1 showing the following GUI:
Complete the SQL code to meet the requirements specified in QUESTIONS 2.1.1 to
QUESTION 2.1.4.
7 Please turn over
Downloaded from hlayiso.com
Information Technology /P1 FS Sept 2020
2.1.1 Button [2.1.1]
A list of all the tblActivity activities taking place on the 23rd September should
be displayed. The date format is YYYY/MM/DD
Example output
(3)
2.1.2 Button [2.1.2]
• Select an activity in the “ListBox”. Code is given to get the input.
• Then display the Surname, Name and ActivityName of the learners who
Surname starts with an "M" AND participates in the specific chosen activity.
• The Surname must be displayed alphabetically.
Example of output of the first 3 records where the River rafting activity was selected.
(5)
2.1.3 Button [2.1.3]
Display the total amount per activity that the learners have already paid, in
a new calculated field called TotalPaid. The totals must be displayed as
currency.
Example output of the first 4 records:
(7)
2.1.4 Button [2.1.4]
Display the Surname, ActivityName and Date of all learners who have already
paid more than R70 [AmountPaid] for the outing
Example output of the first 4 records:
(5)
Sub-total (20)
8 Please turn over
Downloaded from hlayiso.com
Information Technology /P1 FS Sept 2020
2.2 DATABASE MANIPULATION
Select tab sheet Quest_Vraag 2.2, showing the contents of both tables as well as three
buttons for the questions to be completed and a "RichEdit":
NOTE: NO marks will be allocated for using SQL statements in QUESTION 2.2.
The names of the tables to use in your code must be tblActivity and
tblLearner.
NOTE: According to the examination guidelines, pre-coded methods such as 'filter',
'sort' and 'locate' may NOT be allowed, as coding in this regard must be
done from first principles.
Complete the code to meet the requirements specified in QUESTION 2.2.1 to QUESTION
2.2.3.
2.2.1 Button [2.2.1] The cost per activity has changed.
Write code to increase the cost [Cost] of each activity in the tblActivity
table by R50.
Example output of the first 3 records before the change and after the change:
(7)
9 Please turn over
Downloaded from hlayiso.com
Information Technology /P1 FS Sept 2020
2.2.2 Button [2.2.2]
The school wants to know how much money has already been paid per activity.
Write code to calculate the total amount already paid [AmountPaid] for a specific
activity [ActivityName].
• The user must click on the specific activity in the Activity table (tblActivity)
to specify the activity.
• Use the Learner table (tblLearner) to determine how much money has
already been deposited.
• Display the answer in the "RichEdit".
• Make sure the amount is displayed as currency with 2 decimal places.
• Also display the specific activity.
Sample output if activity "Canopying" was selected.
NOTE: English learners can only display the English message. (8)
2.2.3 Button [2.2.3]
Write code to add a new activity to the tblActivity table according to the
following requirements:
• The new activity's name [ActivityName] is: Shark diving.
• The date [Date] on which the activity will take place is the 24th of September
2019.
• Use an input box to allow the user to enter the value for the cost field [Cost].
Example of a new record added for the "Shark diving" activity at a cost of R400.
(5)
Sub-total (20)
Enter your SURNAME and NAME as a comment in the first line of the program
file.
Save your program.
TOTAL :[40]
10 Please turn over
Downloaded from hlayiso.com
Information Technology /P1 FS Sept 2020
SECTION C
QUESTION 3: OBJECT-ORIENTED PROGRAMMING
The school is busy writing a program to help with the processing of marks.
Do the following:
• Open the incomplete program in the QuestionVraag3 folder.
• Open the incomplete object class clsQuestVraag3.pas.
• Compile and run the program.
The following user interface with limited functionality is displayed:
• Complete the code specified in QUESTION 3.1 and QUESTION 3.2
3.1 The incomplete object class (TMarks) provided, contains the declaration of five
attributes describing the object.
The attributes for a Marks object are declared as follows:
• fName - the name of the learner (string)
• fMarks1 - first mark out of a hundred (integer)
• fMark2 - second mark out of a hundred (integer)
• fMark3 - third mark out of a hundred (integer)
• fAverage - learner's average mark real)
The following methods are also provided:
• GetAverage - is used to provide output about the average mark for the
learner using the attribute fAverage.
• toString - is used to provide output from the object.
11 Please turn over
Downloaded from hlayiso.com
Information Technology /P1 FS Sept 2020
Complete the code in the object class as described in QUESTIONS 3.1.1 to
QUESTION 3.1.4.
Ensure that you write this code in your class unit and not in your Delphi unit.
3.1.1 Write code for a constructor method to receive the name and three
marks as parameter values. Assign these values to the relevant
attributes.
(4)
3.1.2 Write a mutator method called setAverage to calculate the average of
the three marks and assign it to the fAverage attribute. (3)
3.1.3 Write an "auxiliary" method called UpdateAverage that receives a
mark out of a hundred as a parameter.
Now use the learner's four different marks and recalculate the average
mark. In other words, the initial 3 marks and the new 4th mark are used
to calculate the average. Assign the new calculated mark to the
fAverage attribute. (4)
3.1.4 Write a method that returns a Boolean value of TRUE if the learner’s
averages is 80 or higher. (2)
Sub-total (13)
3.2 An incomplete program is provided in the QuestionVraag3 folder. The
program contains code for the object class to be accessible and declares an
object variable named objMarks.
The folder also contains a text file named: Data.txt. It contains the name and three
marks of several learners. The information for each learner is provided in the file in the
following format:
Name Surname#Marks1#Mark2#Mark3
Example of the content of the text file:
The purpose of the program is to:
• Find the information of the learner in the text file.
• Use the learner's marks to calculate the average mark.
• If the average is less than 40, the learner has the opportunity to improve
his mark.
• If the average is 80 or more, a message appears.
12 Please turn over
Downloaded from hlayiso.com
Information Technology /P1 FS Sept 2020
Write now code to perform the tasks described in QUESTIONS 3.2.1 to
QUESTION 3.2.4 to calculate learners’ marks.
3.2.1 Button [3.2.1]
The user must enter the name of the learner. The program must find
the name of the learner in the text file named Data.txt.
Write code to do the following:
• Check whether the text file Data.txt exists or not. If the text file does NOT
exist, display a suitable message and close the application.
• If the text file exists, search for the learner's name in the text file. If the
learner's name is found in the text file:
• Extract the learner's three marks
• Use a Boolean variable to stop the search process immediately.
• Instantiate the objMarks object with the required values.
• Display a message if the object has been successfully instantiated.
• If the learner's name is not found in the text file, display an appropriate
message.
Example of different messages that can be displayed
NOTE: English learners can only display the English message. (20)
3.2.2 Button [3.2.2]
•Call the SetAverage method of the class to calculate the learner's average.
•Call the ToString method of the class to display the learner's name and
average in the "RichEdit".
• Call the “accessor” method GetAverage and use this value to determine if
the learner qualifies for re-assessment.
o If the average is less than 40, the learner qualifies for re-assessment
- Display an appropriate message
• Set the "SpinEdit" and the 3_2_1 button to be active.
Example output if the average is 40 and more:
13 Please turn over
Downloaded from hlayiso.com
Information Technology /P1 FS Sept 2020
Example output if the average is less than 40.
Note the "SpinEdit" and button 3.2.3 which are now active.
(5)
3.2.3 Button [3.2.3]
Use the SpinEdit and give the learner's re-assessment point as input. Call the
UpdateAverage method of the class and use the re- assessment mark as a parameter.
Call the ToString method of the class to display the learner's name and updated average
in the "RichEdit".
Example output after the learner received 70 marks for re-assessment
(3)
3.2.4 Call the Boolean method from your class
If the method returns a value of "TRUE" it means that the learner’s
average is 80 and more and he/she must receive a prize at the prize
giving. Display an appropriate message under the learner's name.
If NOT, then an appropriate message should still be displayed.
(3)
NOTE: English learners can only display the English message.
Sub-totaal (31)
Enter your SURNAME and NAME as a comment in the first line of the program file.
Save your program.
TOTAL SECTION C: [44]
14 Please turn over
Downloaded from hlayiso.com
Information Technology /P1 FS Sept 2020
SECTION D
QUESTION 4: PROBLEM SOLVING PROGRAMMING
The CAPS document for IT requires learners to be able to apply their existing knowledge
to solve new problems. This program will test your problem solving skills.
Do the following:
• Compile and run the program in the QuestionVraag4 folder. The program currently
has no functionality.
• Complete the code for each question as described in QUESTION 4.1 to QUESTION
4.3.
The following GUI is displayed when the
program is running:
In this program you are going to use a two
dimensional array to simulate a game.
The array is filled at random with data.
The data must be displayed in a RichEdit not in a
"StringGrid".
Calculations should then be done with the 2
dimensional array data and NOT with the data in
the
"StringGrid". Many programming languages does
not have a StringGrid component.
NOTE: The use of good programming techniques should be used and the use of "hard
coding" should be avoided as far as possible.
Write code to perform the tasks described in QUESTION 4.1 to QUESTION 4.3.
4.1 Button [4.1]
Declare a 2 dimensional array with 6 rows and 6 columns that are going to be
filled with single characters.
Fill the array randomly with “X’s or “O’s. It really must be random. The "X" and
"O" should not form a pattern. (7)
4.2 Button [4.2]
Write code to display the contents of the array in the “RichEdit”.
Ensure there is a space between the “X’s and “O’s.
Example output is displayed on the next page.
15 Please turn over
Downloaded from hlayiso.com
Information Technology /P1 FS Sept 2020
Because the data is generated randomly, your output will differ from the sample.
Note the layout of the data.
The oval is just to indicate the diagonal data you need for Question 4.3.
The 1st The 2nd
transverse transverse
row row.
(6)
4.3 Button [4.3]
Due to time constraints, you only need to do operations with the two diagonal rows.
See the diagram above.
• Count how many crosses and how many noughts are there in the first
transverse row. If there are 5 or 6 of a specific type (for example crosses)
then crosses win
• If there are 5 or 6 noughts then noughts win.
• If there are already 5 of a kind in the first transverse row then it is not
necessary to test further for a winner.
• If 4 of a kind is the most in a transverse row, it means there is no winner.
• Display an appropriate message. (15)
Example output
TOTAL SECTION D: 28
Enter your SURNAME and NAME as a comment in the first line of the program file.
Save your program.
GRAND TOTAL: 150
16 Please turn over
Downloaded from hlayiso.com
Information Technology /P1 Grade 12 FS Sept 2020
ADDENDUM: DATABASE INFORMATION FOR QUESTION 2
The design of the database tables are as follows:
The Excursion.accdb database contains two tables named tblActivity and tblLearner.
The records that appear in the tblActivity table consist of the following fields:
• ActivityName - a unique Activity name (text data type) that is the primary key (PK)
• Date - date of the activity (date / time data type). YYYY/MM/DD
• Cost - the cost of the activity (currency data type)
Sample data from the tblActivity table:
The records that appear in the tblLearner table consist of the following fields:
Field Description
Teacher ID - unique ID code for each learner ("text" data type) ("PK").
Surname - the learner's surname ('text' data type)
Name - the learner's name (text data type)
AmountPaid - the amount of money the learner has already paid (currency data type)
ActivityName - the name of the activity the learner wants to participate in
(Text' data type). This is also the foreign key in the table (FK)
Sample data from the tblLearner table:
The ActivityName field is used to link the two tables.
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

Question paper
Information Technology Grade 12 P1 KZN Prelim 2020 QP

Question paper
Information Technology Grade 12 P1 NSC November 2020 QP

Question paper
Information Technology Grade 12 P1 WC Prelim 2020 QP (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 P2 2023 Memo (Eng)

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

Memorandum