# Information Technology Grade 12 P1 WC Prelim 2020 QP (Eng)

> Grade 12 Information Technology Paper 1 question paper from the WC Prelim 2020 (English), 22 pages. Read online or download the free PDF.

- Page: https://www.hlayiso.com/library/inft-p1-september-2020-eng/3a0f1ced-3108-427d-a1e2-f40a8e1ddc29
- Updated: 2026-09-27
- Subject: Information Technology
- Grade: Grade 12
- Document type: Question paper
- Year: 2020
- Exam period: WC Prelim
- Paper: 1
- Curriculum: CAPS
- Pages: 22

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 WC Prelim 2020 QP (Eng)](https://www.hlayiso.com/library/inft-p1-september-2020-eng/3a0f1ced-3108-427d-a1e2-f40a8e1ddc29)

## About this document

Information Technology · Grade 12 · WC Prelim · 2020. Question paper, 22 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

                                WesternCape

                    SEPTEMBER EXAMINATION – 2020

                       INFORMATION TECHNOLOGY

                          PAPER 1 – PRACTICAL

 TIME: 3 HOURS                                                   MARKS: 150

This paper consists of 22 pages, and there are 4 Delphi projects in your exam
                                   folder.
                  Make sure that you have a complete set.

### Page 2

Downloaded from hlayiso.com
Information Technology                  Paper 1 – Practical                       September 2020

      INSTRUCTIONS AND INFORMATION
 1.   This question paper is divided into FOUR sections. You 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.   Make sure that you answer the questions according to the specifications that are given in
      each question. Marks will only be awarded according to the set of requirements.
 4.   Answer only what is asked for in each question. For example, if the question does not ask for
      data validation, then no marks will be awarded for data validation.
 5.   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.
 6.   Routines such as search, sort and selection must be developed from first principles. You
      may not use the built-in features of the programming language for any of these routines.
 7.   All data structures must be defined by you, the programmer, unless the data structures are
      supplied.
 8.   You must save your work regularly on the disk space allocated to you for the examination
      OR the flash you have been given.
 9.   Make sure that your name and surname appears as a comment in every program that you
      code.
 10   At the end of the examination session, you must make sure that all your work has been saved
 .    on the disk space allocated to you for this examination session OR you must hand in the flash
      with all your work saved on it. Ensure that all the files can be read.

 11   The files you need to complete this question paper have been given to you on the disk space
 .    allocated to you in the form of a password-protected executable file: DataSept2020.exe

      Do the following:
       ●   Double click on the password-protected executable file.
       ●   Click on the ‘extract’ button.
       ●   Enter the following password: Stay@safe!

       Question 1           Question 2                    Question 3            Question 4
       Question1_p.dpr      BackupDB.mdb                  clsCorona_u.pas       Question4_p.dpr
       Question1_p.dproj    ClicksEngen.mdb               Question3_p.dpr       Question4_p.dproj
       Question1_p.res      DataModule_u.dfm              Question3_p.dproj     Question4_p.res
       Question1_u.dfm      DataModule_u.pas              Question3_P.res       Question4_u.dfm
       Question1_u.pas      Question2_P.dpr               Question3_u.dfm       Question4_u.pas
                            Question2_p.dproj             Question3_u.pas       Zones.txt
                            Question2_P.res
                            Question2_P_Icon.ico
                            Question2_U.dfm
                            Question2_U.pas
                            TDBConnection_U.dcu
      Change the name of the LearnerData folder to your Surname and Name.

                                                                                                     2

### Page 3

Downloaded from hlayiso.com
Information Technology                  Paper 1 – Practical                          September 2020

SECTION A

QUESTION 1: GENERAL PROGRAMMING SKILLS

SCENARIO
The Atlantic Aquarium is all about fun and entertainment, for adults and kids alike. It is a popular
destination amongst tourists and locals. Experience the incredible diversity with more than 3000
creatures, from the smallest species to yellowfin tuna and sharks.

Do the following:
• Open the incomplete program in the Question1 folder.
• Enter your name and surname as a comment in the first line of the Question1_U.pas file.
• Compile and execute the program. The program has no functionality currently.
• Follow the instructions below to complete the code for EACH section of
   QUESTION 1, as described in QUESTION 1.1 to QUESTION 1.4.

Example of the GUI:

1.1     Button [1.1 – Determine Entrance Fee]
        The program needs to calculate the entrance fee payable by a group of visitors.
        The appropriate fees are declared as constants in the given code, as follows:
               ADULTPRICE              = 185
               CHILDRENPRICE1          = 90           (for children 4 – 13 years)
               CHILDRENPRICE2          = 140          (for children 14 – 17 years)
        Use these constants in your calculation.
        If it is a leap year, ALL children qualify for a discount of 25% on their entrance fee.
                                                                                                      (10)

                                                                                                        3

### Page 4

Downloaded from hlayiso.com
Information Technology                     Paper 1 – Practical                    September 2020

        Write code to do the following:
        •   Read the input from the spin edits spnAdults, spnChildren1 and spnChildren2
            and determine the entrance fee, using the constants supplied.
        •   If the check box chkLeapYear is selected, 25% of the entrance fee for children
            should be subtracted from the entrance fee.
        •   Change the font size of the panel pnlFees to 12.
        •   The result should be displayed as currency on the panel pnlFees as shown in
            the screenshots below.

        Example of output:

                                                                                                   (10)
1.2     Button [1.2 – Determine Volume]
        There are tanks with various volumes in which fish and sharks are kept.
        Write code to do the following:
        •   Read the input from the user using the components provided.
        •   Ensure that both input fields edtRadius and edtHeight have been filled in. If not,
            the user should be informed in a dialog box and the cursor should be placed in
            edtRadius.                                                            r
        •   Calculate the volume of the tank.
        Use the formula 𝑽𝑽(𝒐𝒐𝒐𝒐𝒐𝒐𝒐𝒐𝒐𝒐) = 𝝅𝝅𝒓𝒓𝟐𝟐 𝒉𝒉, where 𝝅𝝅 is PI
        (3.14), 𝒓𝒓 is the radius and 𝒉𝒉 is the height of the
        tank, to calculate the volume. Display the volume in
        cubic meter, rounded off to TWO decimal places,
        on the panel pnlVolume.

                                                                                                     4

### Page 5

Downloaded from hlayiso.com
Information Technology                    Paper 1 – Practical                     September 2020

        Example output if either edtRadius or edtHeight is not filled in:

        Example output if 3.14 is used for:

        Example output if PI is used for 𝝅𝝅:

                                                                                                   (8)
1.3
        When a school group wants to visit the aquarium, the name of the school, a contact
        telephone number and the number of learners in the group must be entered.
1.3.1   Button [1.3.1 – Validate Number]
        The program must determine if a valid telephone number was entered.
        Write code to do the following:
        •   Read the telephone number from the edit edtTelNumber.
        •   TWO tests should be performed:
              o Whether the telephone number consists of 10 characters
               o   Whether the number starts with a 0
        •   For each test that fails an appropriate message should be displayed in a
            message box, as indicated in the screenshots below.
        •   If the number is valid, the output should include the name of the school.              (6)

                                                                                                    5

### Page 6

Downloaded from hlayiso.com
Information Technology                    Paper 1 – Practical                 September 2020

        Example output if the number is not 10 digits long:

        Example output if the number does not start with a 0:

        Example output if the number is valid:

1.3.2   Button [1.3.2 – Number of Groups]
        When school groups visit the aquarium, the learners are divided into groups and
        each group is allocated a tour guide. The maximum number of learners in a group is
        32. For the aquarium to have the correct number of guides available, the program
        must determine the number of groups for a school’s visit.
        Write code to do the following:
        •   Read the number of learners from the edit edtNumLearners and determine the
            minimum number of groups of a maximum of 32 learners each that will be
            needed for the school.
        •   Display the number of groups on the panel pnlNumGroups.
                                                                                               (4)

                                                                                                6

### Page 7

Downloaded from hlayiso.com
Information Technology                      Paper 1 – Practical                      September 2020

          Example output:

1.4       Button [1.4 - Lucky Draw]
          Each ticket holder has one chance to win a prize. The user must select one of the
          fishes from the combo box cmbFishes. The computer will then generate three
          random numbers. If one of the numbers matches the index of the fish chosen by the
          ticket holder, he/she will win a prize.
          Write code to do the following:
          •   Test that a selection is made. If not, the user should be informed in a message
              box that a selection must be made.
          •   Generate three random numbers in the range 0 to 9 (both included) and compare
              these numbers with the index of the selected item. If one of the numbers matches
              the index, the message “Winner – Congratulations!!” must be displayed in red
              text.
          •   If not successful, the message “Sorry – no winner” must be displayed in blue
              text.
          •   Use pnlDraw for the output.
          •   Ensure that the button btnQ1_4 cannot be clicked again.
          Example output:
          If one of the randomly generated                If one of the generated random
          numbers were 6:                                 numbers were NOT 3:

                                                                                                      (12)
      •   Enter your name and surname as a comment in the first line of the program file.
      •   Save your program.
                                                                        TOTAL SECTION A:               40

                                                                                                        7

### Page 8

Downloaded from hlayiso.com
Information Technology                   Paper 1 – Practical                       September 2020

SECTION B

QUESTION 2: SQL AND DATABASE
This section consists of two questions. The following important notes are applicable to both
questions:
• You are NOT allowed to modify or add to the supplied data in any way.
• Good programming techniques and modular design must be applied when coding your solutions.
• NO marks will be assigned for hardcoding. Use control structures and variables where
   necessary.

SCENARIO: The new Engen partnership, effective 2 December, rewards motorists every time they
fill up and swipe their Clicks ClubCard at participating Engen service stations nationwide. Clicks
ClubCard holders can swipe their cards when filling up at Engen to earn 0.7 points per litre of fuel.

The ClicksEngen.mdb database contains two tables called tblClicks and tblEngen.
The tblClicks table is structured with the following fields:

 FIELD              DATA TYPE          DESCRIPTION
 C_ID (PK)          Number             Club Card member's identification code.
 FNAME              Text               Club Card member’s first name
 LNAME              Text               Club Card member’s last name
 EMAIL              Text               Club Card member’s email address
 GENDER             Text               Gender of the club card member
 DOB                Short Date         The Date of birth of the club card member in the format
                                       YYYY/MM/DD
 SACITIZEN          TRUE/FALSE         Indicates if the club card member is a South African citizen
 POINTS             Number             Club Card member's Click Card points

The tblEngen table is structured with the following fields:
 FIELD              DATA TYPE        DESCRIPTION
 E_ID (PK)          Number           The ID of when a Clubcard membered filled up with fuel at Engen
 ENAME              Text             The Engen Name where the member filled up with fuel.
 C_ID (FK)          Number           A unique number that is the foreign key for club card member
                                     identification code
 DATE               Date/Time        The date the user filled up
 LITERS             Number           The amount of liters the club card member filled up with.

                                                                                                        8

### Page 9

Downloaded from hlayiso.com
Information Technology                       Paper 1 – Practical                       September 2020

Example data from tblClicks table:

 tblClicks
 C_ID     FNAME        LNAME                  EMAIL            GENDER       DOB       SACITIZEN   POINTS

   1     Sholom       Slott          sslott0@artisteer.com     Male      1960/04/30      Yes       964

   2     Alexandra    Minchell       aminchell1@nymag.com      Female    1948/06/24      Yes       652

   3     Astrid       Biddulph       abiddulph2@exblog.jp      Female    1974/03/06      No        32

   4     Red          Reisin         rreisin3@archive.org      Male      1982/05/11      Yes       291

   5     Linus        Elleton        lelleton4@home.pl         Male      1987/07/26      No        236

Example data from tblEngen table:                             Entity Relationship Diagram:

 tblEngen
 E_ID        ENAME            C_ID     DATE       LITERS
  99       FAIRFIELD            1    2020/01/01       37

 106      PRIMROSE              1    2020/01/03       14

 128    BRACKENFELL             1    2020/01/03       17

 157      PRIMROSE              1    2020/01/01       61

  9      GLENHAVEN              2    2020/01/03       32

  25      PRIMROSE              2    2020/01/04       43

NOTE:
   •    Connection code has been provided.
   •    The database is password-protected - therefore you will not be able to access the database
        directly.
   •    When the btnDBRestore button is clicked, the data in the database will be restored to the
        original data.

Do the following:

   •    Compile and execute the program in the Question2 folder. The program currently has
        limited functionality.

   •    Complete the code for each question as described in QUESTION 2.1 and QUESTION 2.2.

The program contains a graphical user interface with two tab-sheets labelled QUESTION 2.1 and
QUESTION 2.2.

                                                                                                           9

### Page 10

Downloaded from hlayiso.com
Information Technology                 Paper 1 – Practical                      September 2020

QUESTION 2.1 - STRUCTURED QUERY LANGUAGE
Select tab sheet QUESTION 2.1, which displays the following user interface:

Complete the SQL code to meet the requirements specified in QUESTION 2.1.1 to
QUESTION 2.1.4
2.1.1 BUTTON [ 2.1.1 - Display club card members ]
      Display the first name, the last name and the email address of all the club card
      members in the tblClicks table. Sort the data in descending order according to first
      name.
      Example output of the first four records:

                                                                                                 (5)
2.1.2 BUTTON [2.1.2 - SA Citizens ]
      Display the first names and surnames of all the South Africans from the tblClicks
      table.
      Example output of the first four records:

                                                                                                 (4)
2.1.3 BUTTON [2.1.3 - Total Fuel Sold]
      Calculate the total liters of fuel sold by each Engen garage. Display the garage name
      and the total amount of liters. Rename the calculated field to Total.
      Example output of the first four records:

      NOTE: You do NOT have to format the calculated
            value
                                                                                                 (6)

                                                                                                  10

### Page 11

Downloaded from hlayiso.com
Information Technology                  Paper 1 – Practical                   September 2020

2.1.4 BUTTON [2.1.4 - Fuel Bought]
       Display the club card member's surname, the date and the amount of fuel bought
       between January the 1st and January the 3rd, both dates included.

       Example output of the first four records:

                                                                                                (6)
                                                                                               [21]
QUESTION 2.2 DATABASE MANIPULATION (NO SQL)
Select tab sheet QUESTION 2.2, which displays the following user interface:

NOTE:

   •    NO marks will be allocated for the use of SQL statements for QUESTION 2.2.
   •    The names of the tables to be used in your code must be tblClicks and tblEngen, which are
        TADOTable objects connected to the database.

Complete the code to meet the requirements specified in QUESTION 2.2.1 to QUESTION 2.2.2.

                                                                                                11

### Page 12

Downloaded from hlayiso.com
Information Technology                  Paper 1 – Practical                        September 2020

2.2.1 BUTTON [ 2.2.1 - Fuel Price ]
      The fuel price during January 2020 was R15.84 per liter.
      Code has been provided to set the various column widths and to display the heading,
      as shown in the example.
      Write code to do the following:
      •   Calculate the total fuel cost of each Engen entry by multiplying the fuel price by
          the number of liters.
      •   Display in the redOutput component the Engen ID, the number of liters and the
          total cost for each transaction entry.
      •   Format the output in neat columns.
      •   Ensure that the total cost is in currency format as shown in example below

      Example output of the first four records (on the next page):

                                                                                                    (8)

2.2.2 BUTTON [ 2.2.2 - Update points ]
      Clicks ClubCard holders can swipe their cards when filling up at Engen to earn 0.7
      point per liter of fuel.
      Example:
      Sholom Scott filled up with 129 liters at Engen garages. His Clicks points need to be
      updated with 90.3 points, bringing his new total to 1 054.3 points.
      Write code to do the following:
      •   Update every member's Clicks points with 0.7 points per liter of fuel they added to
          their cars at an Engen garage.
      •   Display a message indicating that the database has been updated.
      Example output of the first four records:

                                                                                                (11)
                                                                                                    [19]

•   Enter your name and surname as a comment in the first line of the program file.
•   Save your program.

                                                                        TOTAL SECTION B:            40

                                                                                                     12

### Page 13

Downloaded from hlayiso.com
Information Technology                    Paper 1 – Practical                      September 2020

SECTION C

QUESTION 3: OBJECT-ORIENTED PROGRAMMING

    SCENARIO

    The 2019–2020 Covid-19 outbreak is a global pandemic that has been declared a Public Health
    Emergency of International Concern. It is caused by the SARS-CoV-2 coronavirus, first identified
    in Wuhan, Hubei, China. As of 7 July 2020, almost 12 million cases have been confirmed. More
    than 200 countries and territories have been affected, with major outbreaks in the USA, Brazil,
    India and Russia. Worldwide about 541 748 people have already died. Almost 7 million people
    have already recovered.

The incomplete project Question3 is provided in your Question 3 exam folder. It contains:

•     The incomplete main form unit called Question3_u.pas
•     The incomplete object class called clsCorona_u.pas
•     Currently the program has no functionality.

Example of the GUI:

Complete the code for each section of QUESTION 3 as specified in QUESTION 3.1 and
QUESTION 3.2 below.

                                                                                                       13

### Page 14

Downloaded from hlayiso.com
Information Technology                   Paper 1 – Practical                      September 2020

 3.1    An incomplete class called TCorona has been provided. Complete the code in the
        provided class called TCorona as described in QUESTION 3.1.1 to QUESTION
        3.1.8

        The table below contains descriptions of the attributes of the objCorona object:

            ATTRIBUTE        DESCRIPTION
            fCountry         Name of country with coronavirus cases.
            fCases           The number of identified cases.
            fDeaths          The number of reported deaths.
            fRecoveries      The number of patients that have recovered.

 3.1.1 Declare the attributes with the correct data type for each attribute.                       (2)

 3.1.2 Create a constructor method that will receive the name of the country, the number
       of reported coronavirus cases, the number of confirmed deaths and the number of
       patients that have recovered from the coronavirus infection as parameters. Assign
       the received values to the relevant attributes.                                             (3)

 3.1.3 Write code for an accessor method called getCountry for the fCountry attribute.             (1)

 3.1.4 Write code for a mutator method for the fCases attribute called setCases.                   (2)

 3.1.5 Write code for a method called calcFatalityRate that will calculate and return the
       current fatality rate (CFR) according to a (somewhat flawed) formula as follows:
                          CFR = number of deaths / number of cases * 100                           (3)

 3.1.6 Write code for a method called calcActiveCases that will calculate and return how
       many active coronavirus cases exists at that moment in a country as follows:

                 Active cases = number of cases – deaths – number of recovered                     (3)

 3.1.7 Write code for a method called generateCode that will receive a parameter
       indicating the length of the code (minimum 5 and maximum 8 characters).

        NOTE: The length of the code is determined in the form class.

        The method must create and return a code for the country attribute as follows:

        •     The first letter of the country.
        •     A number of random letters from the name of the country excluding the first and
              last letters.
        •     The last letter of the country

                                                                                                    14

### Page 15

Downloaded from hlayiso.com
Information Technology                    Paper 1 – Practical                       September 2020

        NOTE:

        •   If a country has a space in its name, the space has to be ignored when choosing
            a random letter from the country.
        •   Letters may be repeated.
        •   All letters of the code must be capitalised.

        Possible examples codes are shown below:

            For South Africa, a five letter code could be:            SHUAA
            For South Africa, a six letter code could be:             SCARAA
            For South Africa, a seven letter code could be:           SCAORAA
                                                                                                     (7)
            For South Africa, an eight letter code could be:          SHTIHAIA

 3.1.8 Write code for a toString method to display the attributes of the corona object in
       the following format:

                Country: <fCountry>
                Total cases: <fCases>
                Deaths: <fDeaths>
                Recovered: <fRecovered>
                Active cases: <fActiveCases>

        Example:
                                                 Country: South Africa
                                                 Total cases: 205721
                                                 Deaths: 3310
                                                 Recovered: 97848
                                                 Active cases: 104563                                (3)

 3.2    An incomplete form class Question3_U has been provided and contains code for
        the object class to be accessible.

        The following global variables have been declared:

        •   The object objCorona
        •   The following parallel arrays:
             arrCountries:array [1..25] of string = ('USA','India','Brazil',...);
             arrCases:array [1..25] of integer = (3041312,1626071,723185,...);
             arrDeaths:array [1..25] of integer = (133013,65556,20198,...);
             arrRecovered:array [1..25] of integer = (1325516,1072229,441112,...);

        Do the following to complete the code for QUESTION 3.2.1 to QUESTION 3.2.4 in
        the main form unit:

                                                                                                      15

### Page 16

Downloaded from hlayiso.com
Information Technology                    Paper 1 – Practical                        September 2020

 3.2.1 BUTTON [QUESTION 3.2.1 – Instantiate object & display country information]

        The redQ3_2 component must be used as the display area.
        Write code to do the following:

        •   Select a country from the list of countries provided in the combo box.
        •   Find the selected country in the array containing the countries and then use the
            values in the corresponding parallel arrays to instantiate a corona object.
        •   Display a message using a dialog box, to indicate that the object has been
            instantiated.
        •   Call the toString method to display the information of the corona object.
        •   Call the relevant method to calculate and display the number of active cases in
            the country.

        EXAMPLE OUTPUT:

                                                                                                      (7)

                                                                                                       16

### Page 17

Downloaded from hlayiso.com
Information Technology                    Paper 1 – Practical                       September 2020

 3.2.2 BUTTON [3.2.2 – Generate code]
        Write code to do the following:

        •  The user must enter the required length of the country code (5 – 8 characters) in
           the sedQ3_2_2 component.
        • Write code to call the method that will create a code for the country that was
           selected.
        Display the code in the panel pnlCountryCode

        EXAMPLE OUTPUT if the country that was selected is Germany and the required
        length is 5:

        EXAMPLE OUTPUT if the country that was selected is South Africa and the
        required length is 8:

        Remember the country code is generated randomly and might not be the same as
        in the examples.                                                                             (3)

 3.2.3 BUTTON [QUESTION 3.2.3 – Current fatality rate]

        The redQ3_2 component must be used as the display area.

        Write code to do the following:

        •   Call the correct method to calculate the current fatality rate (CFR) for the country
            that was selected in QUESTION 3.2.1.
        •   Display the calculated fatality rate for the selected country correct to 2 decimal
            digits.

        EXAMPLE OUTPUT:                The fatality rate for South Africa = 1.61
                                                                                                     (2)

                                                                                                      17

### Page 18

Downloaded from hlayiso.com
Information Technology                     Paper 1 – Practical                          September 2020

    3.2.4   BUTTON [QUESTION 3.2.4 – Display information of all countries]

            The redQ3_2 component must be used as the display area.

            Write code to do the following:

            •   Clear the display area redQ3_2.
            •   Display all the information (with the appropriate headings as shown below)
                contained in the 4 global arrays in neat columns to inform the user about the
                global spread of the coronavirus.
            •   Display the number to the left of the country names as they occur in the given
                array arrCountries.

            EXAMPLE OUTPUT:

            NOTE:

            •   The code for setting up the columns has been provided in the data file.
            •   Remember to save all files.                                                              (4)

            (NOTE: Information about the United Kingdom is not included as the UK did not
            keep record of their recoveries.)

•     Enter your name and surname as a comment in the first line of the program file.
•     Save your program.

                                                                                  TOTAL SECTION C: 40

                                                                                                          18

### Page 19

Downloaded from hlayiso.com
Information Technology                    Paper 1 – Practical                         September 2020

SECTION D

QUESTION 4: PROBLEM SOLVING

SCENARIO:

A Garden centre requires code to provide users with suggested plants for the 9 climate
zones they live in.

Do the following:

   •   Compile and execute the program in the Question 4 folder.
   •   Complete the code for each question, as described in QUESTION 4.1 to QUESTION 4.2.

Supplied GUI:

4.1    Button [4.1 – Load Zone Info]
       The following text file has been provided:
       •   A text file called Zones.txt is provided.
           The file contains data on all the climate zones in the following format:

                    <Zone name>
                    <Zone number>
                    <Description of the Zone>
                    <End of zone Character Sequence>

                                                                                                       19

### Page 20

Downloaded from hlayiso.com
Information Technology                   Paper 1 – Practical                          September 2020

          Note the following:
          • The description of the zone can be any amount of lines with a minimum amount
            of 1 description line. For example, the ‘Tropical wet’ zone description consists
            of 6 lines while the ‘Subarctic’ zone description consists of only 3 lines.

          The following are the lines of text for the ‘Tropical wet’ zone in the text file:

             Tropical wet
             1
             Tropical wet climates are hot and muggy the year around.
             They support dense tropical rain forests.
             Rainfall is heavy and occurs in frequent showers and
             thunderstorms throughout the year.
             Average annual rainfall varies from about 70 to 100 inches
             (175 to 250 centimetres).
             Temperatures are high, and they change little during the
             year.
             Plants grow all year.
             ***

      Write code to do the following:

      •   Scroll through the text file and locate where the zone name corresponds with the
          zone selected from the combo box, cmbQ4_zones.
      •   Display all the data from the text file that corresponds to the zone name on
          redQ4.
      •   Do not print the end of description sequence (***).

      Example output for the ‘Tundra’ biome:

                                                                                                  (10)

                                                                                                       20

### Page 21

Downloaded from hlayiso.com
Information Technology                   Paper 1 – Practical                        September 2020

4.2   Button [ 4.2 – Add Tree ]

      The garden center has a special growth formula for the trees.

      The following array has been provided:

      •   An array named arrTrees that contains the trees the Garden center sells and the
          amount of growth formula each tree uses, is provided.

              arrTrees :array [1..30] of String=('2:DELONIX REGIA',
                '5:MANILKARA HEXANDRA','7:DIOSPYROS EBENUM',
                 ... );

              Data in the array is stored in the following format:

                 <AmountOfGrowthFormula>:<TreeName>

              Note the following:

                 •   The array has a length of 30.
                 •   The array currently contains 25 items.
                 •   The amount of growth formula will always be a whole number.

      The array is already sorted from the smallest to the largest amount of growth
      formula.

      The center wants you to add a new tree to the array, arrTrees, but keep the correct
      order in the array.

      Write code to do the following:

          •   Get the tree name from the edtTreename component
          •   Get the amount of growth formula from the sedAmount component
          •   Add the new tree to the correct place in the array. You will need to shift all the
              elements in the array to open a space for the new tree.
          •   Display the index of the position in the array where the new tree was added
              using a message box.
          •   Display all the items that is in arrTrees on redQ4Trees.

      Note the following:
         • Your code should be able to add the new tree to the correct position.
         • If the amount of growth formula is equal to another element in the array, you
             should add the new tree to the next index in the array.

      Example output for the tree PIXOLO SCYTHIA with an amount of 22:

                                                                                                     21

### Page 22

Downloaded from hlayiso.com
Information Technology                 Paper 1 – Practical                      September 2020

      Example output for the tree TRENTHIA SPORTU with an amount of 14:

                                                                                             (20)
•   Enter your name and surname as a comment in the first line of the program file.
•   Save your program.

                                                                           TOTAL SECTION D: [30]
                                                                               GRAND TOTAL: 150

                                                                                                 22

## 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
- [Information Technology P1 Sep 2020 QP](https://www.hlayiso.com/library/information-technology-p1-sep-2020-qp/52d2ebb5-6e91-49ca-bff7-a13416b45681) — Information Technology · QP · 2020
- [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
- [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.
