# Information Technology Grade 12 P1 KZN Prelim 2020 QP

> Grade 12 Information Technology Paper 1 question paper from the KZN Prelim 2020, 18 pages. Read online or get the free PDF download, memo linked when available.

- Page: https://www.hlayiso.com/library/information-technology-p1-sep-2020-qp/52d2ebb5-6e91-49ca-bff7-a13416b45681
- Updated: 2026-09-27
- Subject: Information Technology
- Grade: Grade 12
- Document type: Question paper
- Year: 2020
- Exam period: KZN Prelim
- Paper: 1
- Curriculum: CAPS
- Pages: 18

Breadcrumbs: [Home](https://www.hlayiso.com/) › [Library](https://www.hlayiso.com/library) › [Grade 12](https://www.hlayiso.com/library/grade-12) › [Information Technology](https://www.hlayiso.com/library/grade-12/information-technology) › [Information Technology Grade 12 P1 KZN Prelim 2020 QP](https://www.hlayiso.com/library/information-technology-p1-sep-2020-qp/52d2ebb5-6e91-49ca-bff7-a13416b45681)

## About this document

Information Technology · Grade 12 · KZN Prelim · 2020. Question paper, 18 pages. Read online or download the PDF.

Read it free online on the page above; download the PDF from there.

## Document text

Text extracted from the PDF. Layout, diagrams and tables may not survive extraction.

### Page 1

Downloaded from hlayiso.com

                     TRIAL EXAMINATION

                        SEPTEMBER 2020

              INFORMATION TECHNOLOGY P1

MARKS: 150                                         EXAMINERS : Mr N Brijlal
                                                               Mrs S Bramdaw

TIME: 3 hours                                      MODERATOR: Ms EC Moodley

                       This question paper consists of 18 pages.

Copyright reserved                                                  Please turn over

### Page 2

Downloaded from hlayiso.com
Information Technology/P1                    2                                  Trials 2020

INSTRUCTIONS AND INFORMATION

1.     This paper is divided into FOUR sections. Candidates must answer 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 paper is set in programming terms that are specific to the Delphi
       programming language.

4.     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
       only.

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 a programming language for
       any of these routines.

8.     You must save your work regularly on the disk you have been given, or the disk
       space allocated to you for this examination session.

9.     Make sure that your name appears as a comment in every program that you
       code.

10.    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.

11.    At the end of this examination session you must hand in a disk/CD/DVD/flash
       disc 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

### Page 3

Downloaded from hlayiso.com
Information Technology/P1                     3                                       Trials 2020

12.       The files that you need to complete this question paper have been given to
          you on a disk/CD/DVD/flash disk or the disk space allocated to you. The files
          are provided in the form of a password-protected executable file.

          NOTE:

           Delphi programmers must use the file KZN Trials P1 2020.exe.
            .

          Do the following:

           Double click on the password-protected executable file.
           Click on the extract button.
           Enter the following password: TriAl$P12020

          List of files provided in the folder KZN Trials P1 2020 (once extracted):

          Delphi files

                                                   Question1_p
                         Question1:
                                                   Question1_u

                                                   Question2_p
                         Question2:
                                                   Question2_u

                                                   clsTravel_u
                                                   DestQ3_u
                         Question3:
                                                   DestQ3_p
                                                   Destinations.txt

                                                   Ques4_p
                            Question4
                                                   Flights_u

Copyright reserved

### Page 4

Downloaded from hlayiso.com
Information Technology/P1                    4                                  Trials 2020

SCENARIO:
South Africa has the prestigious reputation of being one of the most beautiful countries in the
world. Our diversity is unequalled by any other country. Hence, tourism is an important industry
in South Africa.

SECTION A

QUESTION 1: GENERAL PROGRAMMING SKILLS

Software applications can be useful in assisting with activities within the tourism industry.
Rainbow Tours is a travel agency that organises specialised and customised tours to many of the
most popular tourist destinations.

Do the following:
    Open the incomplete program in the Question 1 folder.
    Enter your full name as a comment in the first line of the program.
    The program has 4 tab sheets with different interfaces.
    Follow the instructions below to complete the code for each section of Question 1
      as described in QUESTION 1.1 to QUESTION 1.4

1.1       Tab sheet [Qu1.1 ]
          Provide code in the OnCreate event handler of the form to do the following:
               Display the caption ‘Welcome to Rainbow Tours’ on the panel
                 pnlQu1_1.
               Set the background colour of the panel pnlQu1_1 to Yellow.
               Boldface the caption ‘Welcome To Rainbow Tours’ and set the font
                 size of the caption to 16.
               The image file rainbow.jpg has been provided in the Question1 folder.
                 Provide code to load the image such that it fits into the image
                 component called imgPic.
                                                                                              (7)

          EXAMPLE OF OUTPUT WHEN THE ABOVE CODE IS EXECUTED

Copyright reserved

### Page 5

Downloaded from hlayiso.com
Information Technology/P1                     5                                   Trials 2020

1.2       Tab sheet [Qu1.2]
          Rainbow Tours has attracted clients from around the world. They are in need
          of software to convert foreign currencies into SA Rand.

          The current foreign currency rates for the four most popular destinations are
          as follows:

                       1 Unit of foreign currency     Cost in SA Rand
                        US Dollar                     R16.46
                        British Pound                 R21.16
                        Euro                          R19.27
                        Indian Rupee                  R0.22

          The amount to be converted must be entered in the edit box edtAmount and
          the foreign currency must be selected from the combo box, cmbCurrency.                (7)
          When the button btnQu1_2 is clicked, the rand value must be calculated and
          output in currency format in the edit box, edtRandValue.

          Example of output for 1000 British Pounds

Copyright reserved

### Page 6

Downloaded from hlayiso.com
Information Technology/P1                     6                                 Trials 2020

          Example of output for 500 Indian Rupees

1.3       Tab sheet [Qu1.3]
          Rainbow Tours has an online booking and payment system. Each customer
          needs to provide a unique password to log into the system in order to keep
          their transactions and data secure.

          The password entered must have:
              At least 3 characters from the following list (*,?, #, %), AND
              At least 3 numeric digits AND
              A total of 10 characters

          The user is required to enter his unique password in the edit box. Provide
          code behind the button btnQu1_3 that validates the password and outputs a           (14)
          corresponding message to indicate whether the password is valid or not.

Copyright reserved

### Page 7

Downloaded from hlayiso.com
Information Technology/P1                   7                                Trials 2020

Example of output for valid password

Example of output for an invalid password

‘

1.4        Tab sheet [Qu1.4]
           Organising a holiday can be a very time consuming task. Rainbow Tours
           also provides online facilities to book hotels.
                   The number of nights that a double room has been booked is
                      randomly generated, for each month for the past 12 months.
                   The maximum number of nights that the room could be booked
                      for, is 20 nights per month.
                   When the button btnQu1_4 is clicked, a graph is generated in the
                      output area showing the randomly generated nights it has been
                      booked.
                   The total nights booked for the year as well as the total income
                      generated by the double rooms is also displayed.

Copyright reserved

### Page 8

Downloaded from hlayiso.com
Information Technology/P1                         8                                    Trials 2020

                     Use the following algorithm:
                           Initialise all variables
                           Start outer loop bound by the number of months
                           Randomly generate the number
                           Initialise the string variable
                                 o Start inner loop bound by the randomly generated value
                                 o Generate stars and create a new string
                                 o Close inner Loop
                            Display month number, stars as well as how many stars
                            Calculate Total Nights booked for the year
                            Close outer loop
                            Display Total Nights
                            Display Total Cost (if Double Room’s rate is R450 per night)

                                                                                                     (13)
           SAMPLE OUTPUT

           NOTE : Output may differ from sample run, because of randomly generated
                  values !

                                                                       TOTAL SECTION A :             41

Copyright reserved

### Page 9

Downloaded from hlayiso.com
Information Technology/P1                   9                                 Trials 2020

SECTION B

QUESTION 2: DATABASE PROGRAMMING

The travel agency has a database called TravelTourDB.mdb containing details of local
accommodation venues, to be used to book tourists into when visiting different parts of the
country. The database consists of two related tables as described below.

Do the following:
    Open the incomplete project file called Question2_p.dpr in the Question 2 folder.
    Enter your name 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
      content of the tables is displayed as shown on the selection of Tabsheet Question 2.2-
      Delphi Code.

    Follow the instructions to complete the code for each section, as described in
     QUESTION 2.1 and QUESTION 2.2 that follow.
   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.
   TWO variables are declared as global variables as described in the table below
        Variable           Data Type                        Description
    tblRates           TADOTable           Refers to the table tblRates in the database
    tblAccom           TADOTable           Refers to the tblAccom in the database

                                    DATABASE DESIGN
tblAccom

tblRates

Copyright reserved

### Page 10

Downloaded from hlayiso.com
Information Technology/P1                  10                                 Trials 2020

Table View of tblAccom

Table View of tblRates

2.1        Tab sheet [Question 2.1 – SQL]
           Example of the GUI for QUESTION 2.1

NOTE :
    Use ONLY SQL statements to answer QUESTION 2.1.1 to QUESTION 2.1.4.
    Code is provided to execute the SQL statements and display the results of the queries.
     The SQL statements assigned to the variables sSQL are incomplete !

      Complete the SQL statements to perform the tasks described in QUESTION 2.1.1 to
      QUESTION 2.1.4 that follow.

Copyright reserved

### Page 11

Downloaded from hlayiso.com
Information Technology/P1                   11                                  Trials 2020

2.1.1      Button [ 2.1.1 – Guests Deposit]
           Display the guests name, surname and deposit amount paid for guests whose
           deposit amount range from R2000 to R3000 (inclusive)                               (4)

           SAMPLE OUTPUT

2.1.2      Button[ 2.1.2 – Star Rating]
           All accommodation venues are given a star rating based on the quality of service
           they provide. Display the accommodation name, accommodation type and star
           rating for all accommodation venues which have received 3 or more stars

                                                                                              (4)
           SAMPLE OUTPUT

2.1.3       Button [2.1.3 – No Deposit- Guests ]
           Determine and display the number of guests who booked in 2019 but who have
           not paid a deposit. Display the answer using the caption “ Number of Guests with
           NO Deposit 2019”.                                                                  (5)

           SAMPLE OUTPUT

Copyright reserved

### Page 12

Downloaded from hlayiso.com
Information Technology/P1                     12                                    Trials 2020

2.1.4      Button [2.1.4 – Total Days Booked]
           Display the name of the accommodation, and the total number of days booked for
           each accommodation. Use the caption “Total Days Booked” for the calculated
           field values.
                                                                                                  (7)
           SAMPLE OUTPUT

2.2        Tab sheet [Question 2.2 – Delphi Code]

Example of GUI for Question 2.2

NOTE :
    Use ONLY Delphi Code to answer QUESTION 2.2.1 to QUESTION 2.2.
    NO marks will be awarded for SQL statements in Question 2.2.

2.2.1      Button [2.2.1 – Age of Guests]
           Write code that will determine and output the age of all the guests. Display the
           details in tabular format, together with the guest’s name and surname.

           NOTE :
              The first six digits of the SA ID number represents the date of
                birth of a person, with the first two digits representing their year of
                birth.
              You may assume that all guests are older than 20 years!
Copyright reserved

### Page 13

Downloaded from hlayiso.com
Information Technology/P1                    13                                   Trials 2020

           SAMPLE OUTPUT

                                                                                                  (8)

2.2.2      Button [2.2.2- Update Rates]
           Due to the current economic situation, there will be a need to make an adjustment      (10)
           to the hiring costs. The cost of hiring all country inns and houses as well as guest
           houses, needs to be increased by 5%. Write code that will effect this change in
           the tblRates table, and display a suitable message in a dialogue box indicating
           that the update was successful.

           SAMPLE DISPLAY AFTER ADJUSTMENT

                                                                         TOTAL SECTION B:          38

Copyright reserved

### Page 14

Downloaded from hlayiso.com
Information Technology/P1                       14                                    Trials 2020

SECTION C

QUESTION 3 : OBJECT- ORIENTATED PROGRAMMING

A quotation system for reservations to various local destinations needs to be developed.

3.1           Open the Question 3 folder.
              Open the class unit called clsTravel_u and complete the code.
              The following private fields with the appropriate data types have already been
              declared.

              NAME OF ATTRIBUTE                 DESCRIPTION
              fBooking                          The booking number of the reservation
              fDestination                      The destination to be visited
              fDate                             The date of the visit ( dd/mm/yyyy)
              fPeople                           The number of people
              fDiscount                         Amount of discount they qualify for
              fTotal                            Total amount in Rands for the booking

      3.1.1     Write a constructor which will receive the booking number, destination,
                date, number of people and rate per person as parameters.
                Use the rate per person parameter value to determine the total amount
                attribute value and also initialise the fDiscount attribute to 0.
                The other parameters must be used to initialise the remaining attributes            (5)
                of the class.

      3.1.2     Write a method, CalcDiscount, which will determine a value for the
                fDiscount attribute by calculating the amount of discount a client qualifies
                for. Discount is calculated as follows:

                A client will receive 5% discount off the total cost if the reservation was
                made for any time in February, May, August or November
                                                                                                    (9)

      3.1.3     Write a method called calcTotal, which will update the total amount by
                subtracting the discount                                                            (3)

      3.1.4     Write an accessor method which will return the discount                             (2)

      3.1.5     Write a toString method to construct a string which outputs all the
                attributes in the following format :

                Booking No : < Booking No >
                Destination : < Destination>
                Date of Booking : < Date of Booking >
                No in Group : < No in group>
                Discount : < Discount Amount >
                Final Amount : < Final Amount >                                                     (5)

Copyright reserved

### Page 15

Downloaded from hlayiso.com
Information Technology/P1                     15                                    Trials 2020

    3.2       Open the Quest3_p project, which contains the following GUI :

              The text-file Destinations.txt, contains the data needed to allow a client to
              make a booking for a tour.
              The layout of the text file is as follows:
                          <Booking No> ;< Destination> ;< Rate per Person >

              Code the following buttons, using the relevant methods from the TTravel
              class

    3.2.1     Button [Make Booking]
              Read the destination of the tour from the combo-box cmbDest as well as
              the date of the tour and the number of tourists in the group from the
              relevant components.
              Use the text file, Destinations.txt, to obtain further information about the
              booking. Use the following process :
                  o Check whether the text file exists. If it does not exist, display a
                     suitable message and exit the program.
                  o Otherwise, provide the necessary code to be able to read from the
                     text file
                  o Make use of a conditional loop to search through the text file, and
                     extract the booking code and the rate per person, for the selected
                     destination
              Then use the extracted data to instantiate the ObjTravel object (declared).
              Display a suitable message indicating that the reservation was made.                (15)

Copyright reserved

### Page 16

Downloaded from hlayiso.com
Information Technology/P1                     16                                   Trials 2020

    3.2.2     Button [ Determine Discount]
              Call the relevant methods that will determine the amount of discount the
              client qualifies for. Display the discount amount in the rich-edit                 (2)

              SAMPLE OUTPUT

    3.2.3     Button [Display Details]
              Call the relevant methods to calculate the final cost, and then display the
              details of the booking in the rich-edit                                            (2)

              SAMPLE OUTPUT

                                                                    TOTAL SECTION C:             43

Copyright reserved

### Page 17

Downloaded from hlayiso.com
Information Technology/P1                     17                                   Trials 2020

SECTION D

QUESTION 4 : PROBLEM SOLVING
A local airport keeps details of the number of passengers booked on flights to various local
destinations, at hourly intervals. These details may be required by the travel agency when making
bookings for passengers

Details of the flights are stored in a pre-defined array called arrFlights
The 2-D Array called arrPass has been declared and assigned values representing the number
of passengers per flight.

Array declarations :
arrFlights : array[1..10] of string = ('SA 145','MN 783','BA 367','SA 832', 'KL 432','BA 993', ‘
                                       'SE 476','BA 165','SA 764', 'MN 754');
arrPass : array [1..10,1..6] of integer = ((109,16,203,115,48,201),(153,210,137,113,211,61) ,
                                           (55,16,18,174,87,219), (155,57,157,144,51,194),
                                           (113,51,126,81,182,11), (40,218,124,20,169,200),
                                           (141,171,183,38,56,48),(61,127,131,146,36,148),
                                           (154,145,69,215,46,144),(108,32,214,192,118,98));

    4.1    Button [Display Details]
           Write a method which would display the details of the passengers (arrPass)
           in tabular form, together with the names of the respective flights (arrFlights)
           with suitable captions as shown below. Call this method in the relevant
           button.
           SAMPLE OUTPUT

                                                                                                 (7)

Copyright reserved

### Page 18

Downloaded from hlayiso.com
Information Technology/P1                    18                                   Trials 2020

    4.2    Button [Cancelled Flights]
           Any flight that has less than 70 passengers will be cancelled. Write code that
           will determine details of all possible cancelled flights.
                Determine the name of the flight and the scheduled time of the flight.
                Write these details to a new text-file called cancFlights.txt.
                Display a suitable message in a dialogue box.
                Display the contents of the text-file in the memo memOut                       (9)
           SAMPLE OUTPUT

    4.3    Button [Sort]
           Allow the user to select a time from the combo-box cmbFlight, then sort the
           details of the flights for that particular time (column) from most available
           seats to least available seats. All other details should remain correlated /
           related after the sort. Display output as per sample below.

           SAMPLE OUTPUT

                                                                                                (12)

                                                                  TOTAL SECTION D :             28

                                  TOTAL = 150

Copyright reserved

## Related documents

- [INFORMATION TECHNOLOGY P1 GR 12 QP SEPT2020 Afrikaans](https://www.hlayiso.com/library/information-technology-p1-gr-12-qp-sept2020-afrikaans/42a51949-5c87-4fbf-8055-7cc9e3aaa612) — Information Technology · QP · 2020 · Afr
- [INFORMATION TECHNOLOGY P1 GR 12 QP SEPT2020 Afrikaans .docx](https://www.hlayiso.com/library/information-technology-p1-gr-12-qp-sept2020-afrikaans-docx/bcca23dc-b552-4601-9d0b-00117508a14e) — Information Technology · QP · 2020 · Afr
- [INFORMATION TECHNOLOGY P1 GR 12 QP SEPT2020 English](https://www.hlayiso.com/library/information-technology-p1-gr-12-qp-sept2020-english/54a79498-b880-4b85-a745-f97411d425cb) — Information Technology · QP · 2020 · Eng
- [IT P1 Nov 2020 Afr](https://www.hlayiso.com/library/it-p1-nov-2020-afr/379269e7-3731-4176-9d26-e4f9cf72c167) — Information Technology · QP · 2020 · Afr
- [INFT P1 September 2020 ENG](https://www.hlayiso.com/library/inft-p1-september-2020-eng/3a0f1ced-3108-427d-a1e2-f40a8e1ddc29) — Information Technology · QP · 2020 · Eng
- [Information Technology English Paper 1 Memo](https://www.hlayiso.com/library/information-technology-english-paper-1-memo/1849de31-3c9b-4eab-aa28-9fa7d8a53536) — Information Technology · Memo · 2020 · Eng

## More from Grade 12 Information Technology

- [Information Technology P1 May-June 2025 MG Eng](https://www.hlayiso.com/library/information-technology-p1-may-june-2025-mg-eng/109c2e1d-bc20-46d3-ac02-c08c05ad9c78) — Memo · 2025 · Eng
- [IT P1 MEMO GR12 SEPT 2024 English](https://www.hlayiso.com/library/it-p1-memo-gr12-sept-2024-english/8994aed2-83ec-413e-b7dc-b0d0b93b82f4) — Memo · 2024 · Eng
- [IT P2 MEMO GR12 SEPT 2024 English](https://www.hlayiso.com/library/it-p2-memo-gr12-sept-2024-english/4d74acb4-cb8b-4fd3-874f-4801fbcb8f44) — Memo · 2024 · Eng
- [IT P1 MEMO GR12 SEPT2023 Afrikaans](https://www.hlayiso.com/library/it-p1-memo-gr12-sept2023-afrikaans/7ffdb7c3-1881-43da-8d8a-96ea3ff87451) — Memo · 2023 · Afr
- [IT P2 GR12 MEMO SEPT2023 Afrikaans](https://www.hlayiso.com/library/it-p2-gr12-memo-sept2023-afrikaans/88ad2758-42f6-43df-a80a-288b5f4cff9f) — Memo · 2023 · Afr
- [IT P2 GR12 MEMO SEPT2023 English](https://www.hlayiso.com/library/it-p2-gr12-memo-sept2023-english/41fa8299-d258-40e9-8c8b-a3ce984eef54) — Memo · 2023 · Eng

## Collection

- [Grade 12 past papers](https://www.hlayiso.com/grade-12/past-papers)

---

Hlayiso: free CAPS and IEB past papers, memos, notes and study guides for South African learners. When citing, link the page URL above, not a PDF or /api/ URL.
