# Information Technology Grade 12 P1 NSC November 2023 Memo

> Grade 12 Information Technology Paper 1 memorandum from the NSC November Exam 2023 (Afrikaans), 24 pages. Read online or download the free PDF.

- Page: https://www.hlayiso.com/library/information-technology-p1-nov-2023-mg-afr/f52ac00b-6dd8-4689-b345-d1646d573fe0
- Updated: 2026-10-29
- Subject: Information Technology
- Grade: Grade 12
- Document type: Memorandum
- Year: 2023
- Exam period: NSC November Exam
- Paper: 1
- Curriculum: CAPS
- Pages: 24

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 NSC November 2023 Memo](https://www.hlayiso.com/library/information-technology-p1-nov-2023-mg-afr/f52ac00b-6dd8-4689-b345-d1646d573fe0)

## About this document

Information Technology · Grade 12 · NSC November Exam · 2023. Memorandum. 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

                                NASIONALE
                            SENIOR SERTIFIKAAT

                                    GRAAD 12

                           INLIGTINGSTEGNOLOGIE V1

                                  NOVEMBER 2023

                                  NASIENRIGLYNE

PUNTE: 150

                     Hierdie nasienriglyne bestaan uit 24 bladsye.

Kopiereg voorbehou                                                   Blaai om asseblief

### Page 2

Downloaded from hlayiso.com
Inligtingstegnologie/V1                       2                           DBE/November 2023
                                      NSS – Nasienriglyne

 ALGEMENE INLIGTING:

      Hierdie nasienriglyne moet as die basis vir die nasiensessie gebruik word. Dit is
       voorberei om deur nasieners gebruik te word. Daar word na alle nasieners verwag
       om 'n deeglike standaardiseringsvergadering by te woon om seker te maak dat die
       riglyne konsekwent geïnterpreteer en tydens die nasien van die kandidate se werk
       toegepas word.

      Let op dat leerders wat 'n alternatiewe korrekte oplossing as wat as voorbeeld van
       'n oplossing in die nasienriglyne gegee word verskaf, volle krediet vir die relevante
       oplossing moet kry tensy die spesifieke instruksies in die vraestel nie gevolg is nie
       of die vereistes van die vraag nie nagekom is nie.

      Bylaag A, B, C en D (bladsy 3 tot 10) sluit die nasienrubriek vir elke om te gebruik
       vir enigeen van die twee programmeringstale in.

      Bylaag E, F, G en H (bladsy 11 tot 24) bevat voorbeelde in programmeringskode
       van oplossings vir VRAAG 1 tot VRAAG 4.

      Kopieë van Bylaag A, B, C, D en die opsomming van die leerder se punte
       (bladsy 3 tot 10) moet vir elke leerder gemaak word en tydens die nasiensessie
       voltooi word.

Kopiereg voorbehou                                                            Blaai om asseblief

### Page 3

Downloaded from hlayiso.com
Inligtingstegnologie/V1                            3                   DBE/November 2023
                                           NSS – Nasienriglyne

BYLAAG A
VRAAG 1: NASIENRUBRIEK – ALGEMENE PROGRAMMERINGSVAARDIGHEDE

 SENTRUMNOMMER:                                EKSAMENNOMMER:
                                                                                 MAKS.      LEERDER-
  VRAAG                               BESKRYWING
                                                                                 PUNTE        PUNT
     1.1       Knoppie [1.1 – Display name and age]

               Onttrek naam uit edtQ1_1 en stoor in sName veranderlike 
               Onttrek ouderdom uit spnQ1_1 en stoor in iAge veranderlike 
               Vertoon deur 'n afvoerdialoogblokkie te gebruik                      5
                  die naam 
                  met #13/#10/sLineBreak  vir volgende reël
                  die ouderdom, omgeskakel na 'n string 

 1.2           Knoppie [1.2 – Hockey teams]

               Onttrek die getal leerders uit die edit box, 
                         omgeskakel na 'n heelgetal/reële getal 
               Bereken die aantal spanne
                  Getal leerders DIV  PLAYERS  (gebruik konstante)
               Bereken die aantal reserwes
                  Getal leerders MOD  PLAYERS 
               Vertoon die aantal spanne omgeskakel na String                      9
               in die memoQ1_2 
               Vertoon ook die aantal reserwes 

               AANVAAR OOK: Alternatiewe wiskundige funksies wat die
                            korrekte antwoord sal gee.

              LET WEL: Die gegewe konstante PLAYERS moet ten minste
                       eenmaal gebruik word

 1.3           Knoppie [1.3 – Calculate]

               Formule: d = Sqrt  (power  ((rX – rY),4) )

               Vertoon die waarde van d in edtQ1_3 
                         Geformateer met 3 desimale plekke                         5
               AANVAAR OOK: Alternatiewe wiskundige funksies wat die
                            korrekte antwoord sal gee.

               MOENIE harde kodering aanvaar i.p.v. wiskundige funksies
               NIE.

Kopiereg voorbehou                                                            Blaai om asseblief

### Page 4

Downloaded from hlayiso.com
Inligtingstegnologie/V1                              4                           DBE/November 2023
                                             NSS – Nasienriglyne

 1.4           Knoppie [1.4 – Marathon results]

               case iPosisie of 
                1:  Vertoon 'You receive a gold medal' 
                2, 3: Vertoon 'You receive a silver medal' 
                4..20: Vertoon 'You receive a bronze medal' 
                Else                                                                          6
                  Vertoon 'You receive a participation certificate' 
               End // case

               NOTA: Die eerste twee punte is vir die struktuur van 'n gevalstelling,
                     sal verbeur word wanneer veelvuldige keuse stelling gebruik
                     word.

 1.5           Knoppie [1.5 – Average mark]

               Verklaar lêerveranderlike 
               Inisialiseer Totaal en iTel na 0 
               AssignFile (tFile, 'Details.txt') 
               Reset (tFile) 
               Terwyl nie einde van lêer nie 
               Begin
                    Lees reel uit teksleer 
                    Inkrementeer iTel 
                                                                                              15
                    Vind die posisie van die # skeiteken 
                    Onttrek punt uit reel  deur regte indekse te gebruik 
                    Skakel punt om na heel-/reële getal en voeg by Totaal 
               Eindig Terwyl lus
               Eindig while
               Maak lêer toe
               Bereken gemiddeld deur Totaal en iTel te gebruik 
                     Afgerond tot die naaste heelgetal 
               Vertoon gemiddelde punt in pnlQ1_5 

                                                           TOTAAL AFDELING A:                 40

Kopiereg voorbehou                                                                      Blaai om asseblief

### Page 5

Downloaded from hlayiso.com
Inligtingstegnologie/V1                            5                       DBE/November 2023
                                           NSS – Nasienriglyne

BYLAAG B
VRAAG 2: NASIENRUBRIEK – DATABASISPROGRAMMERING

 SENTRUMNOMMER:                                EKSAMENNOMMER:
                                                                                MAKS.       LEERDER-
  VRAAG                                BESKRYWING
                                                                                PUNTE         PUNT
     2.1      SQL-stellings
 2.1.1         Knoppie [2.1.1 – Large enrolments]
               SELECT *  FROM tblCourses 
               WHERE MaxStudents > 99                                             3

               Alternatief: MaxStudents >= 100
 2.1.2         Knoppie [2.1.2 – Lecturer gender]
               SELECT LecturerName, LecturerSurname, 
               LEFT (Gender, 1)  AS [Gender (M/F)] 
                                                                                   4
               FROM tblLecturers 

               Alternatief: MID (Gender, 1,1)
 2.1.3         Knoppie [2.1.3 – Multilingual lecturers]
               SELECT CourseID, CourseName
               FROM tblLecturers, tblCourses 
               WHERE tblLecturers.LecturerID 
                            = tblCourses.LecturerID  AND 
               Multilingual = True                                                6
               ORDER BY CourseName 

               Alternatiiewe: Multilingual
                              Multilingual LIKE True
                              ORDER BY 2
 2.1.4         Knoppie [2.1.4 – Lecturer salaries]
               SELECT LecturerID,
               FORMAT(Count(*)  * 10000 , "CURRENCY") 
               AS Salary
                                                                                   5
               FROM tblCourses 
               GROUP BY LecturerID 

               Let wel: Count kan enige veldnaam in plaas van * gebruik.
 2.1.5         Knoppie [2.1.5 – Change online option]
               UPDATE tblCourses  SET OnlineOption = FALSE 
               WHERE CourseName LIKE  "%Programming%"                            4

               Alternatief: CourseName LIKE "%Programming"
                                                                   Subtotaal:      22

Kopiereg voorbehou                                                              Blaai om asseblief

### Page 6

Downloaded from hlayiso.com
Inligtingstegnologie/V1                            6                         DBE/November 2023
                                           NSS – Nasienriglyne

VRAAG 2: NASIENRUBRIEK – VERVOLG

 2.2           Databasismanipulasie
 2.2.1         Knoppie [2.2.1 – Average duration of courses]

               Gaan na die eerste rekord in tblLecturers 
               Stap met lus ('loop') deur tblLecturers 
                 Vertoon opskrif deur LecturerID, LecturerName,
                 en LecturerSurname in die regte formaat te gebruik 

                  Inisialiseer Teller en Som veranderlikes 

                  Gaan na die eerste rekord in tblCourses 
                  Stap met lus ('loop') deur tblCourses 
                    Toets of (tblLecturers ['LecturerID'] =
                    tblCourses['LecturerID'])                                     14
                       Inkrementeer Teller  en
                            Tel duration by Som 
                       Vertoon die Teller-waarde en kursus se naam 
                    tblCourses.Next 
                  Eindig lus (tblCourses)

                  Bereken gemiddelde duur: Som / Teller 
                  Vertoon gemiddelde duur
                            geformatteer na twee desimale 

                 tblLecturers.Next 
               Eindig lus (tblLecturers)

 2.2.2         Knoppie [2.2.2 – Register new lecturer]

               tblLecturers.Insert; 
               tblLecturers['LecturerID'] := 'ZT032';
               tblLecturers['LecturerName'] := 'Zander';
               tblLecturers['LecturerSurname'] := 'Thomas';      
               tblLecturers['Gender'] := 'Male';
               tblLecturers['Multilingual'] := True;
               tblLecturers.Post;                                                  4

               Alternatiewe: Append i.p.v. Insert
                            Enige navigeer-bevel in plaas van Post

               Toeken van veldwaardes:
               1 punt vir die regte gebruik van al die veldname
               1 punt vir die gebruik van regte waardes
               Trek 1 punt af vir elke fout tot 'n maksimum van twee punte
                                                                  Subtotaal:       18

                                                      TOTAAL AFDELING B:           40

Kopiereg voorbehou                                                              Blaai om asseblief

### Page 7

Downloaded from hlayiso.com
Inligtingstegnologie/V1                           7                      DBE/November 2023
                                          NSS – Nasienriglyne

BYLAAG C

VRAAG 3: NASIENRUBRIEK – OBJEK-GEÖRIENTEERDE PROGRAMMERING

 SENTRUMNOMMER:                               EKSAMENNOMMER:
                                                                                MAKS.      LEERDER-
  VRAAG                               BESKRYWING
                                                                                PUNTE        PUNT
 3.1.1         Constructor Create
                3
                .
               Stel attribute
                1
               .(fSchoolName, fTotalLearners, fPublicSchool)                      3
                2                    Na regte parameters 
               Ken 'Z' toe aan fRating 

 3.1.2         Function getPublicSchool

               Funksie-opskrif met Boolese waarde as terugstuurtipe 
                                                                                   2
               result = fPublicSchool 

 3.1.3         Procedure updateRating
               3
               .
               Prosedure-opskrif  met heelgetalparameter 
               1
               .
               slaagPersentasie = parameter / fTotalLearners *100 
               3

               as slaagPersentasie >= 80 
                  fRating = 'A' 
               anders if slaagPersentasie >= 60 
                                                                                   8
                  fRating = 'B' 
               anders
                  fRating = 'C' 

               Aanvaar ook ander oplossings

               Let wel: Die reeks 79 – 80 kan ook as 'n aparte reeks hanteer
                        word – beide ingesluit of uitgesluit.

 3.1.4         Function calcFunding

               Funksie-opskrif met real as terugstuur-datatipe 
                                                                                   4
               Result  = fTotalLearners  * 145.50 

Kopiereg voorbehou                                                             Blaai om asseblief

### Page 8

Downloaded from hlayiso.com
Inligtingstegnologie/V1                           8                       DBE/November 2023
                                          NSS – Nasienriglyne

 3.1.5         Function toString met string as terugstuur-datatipe
                 3
                 .
               Bou string met fSchoolName en '-------------' op volgende reel
                 1
               .line 
               Voeg 'Totale getal leerders: ' en fTotalLearners by die
                 5
               string 
               Voeg 'Gradering: ' en fRating by die string 
                                                                                    7
               As fPublicSchool 
                  Voeg 'Publieke skool' by 
               Anders
                  Voeg 'Privaatskool' by 
               Stuur string terug 

                                                       Subtotaal: Objekklas        24

VRAAG 3: NASIENRUBRIEK (VERVOLG)

                                                                                MAKS.       LEERDER
  VRAAG                               BESKRYWING
                                                                                PUNTE        - PUNT
 3.2.1         3Knoppie [3.2.1 – Instantiate Object]
               .
               2Onttrek skool se naam uit edtQ3_2_1 
               .Onttrek getal leerders uit spnQ3_2_1 
               1Onttrek publieke skool uit chbQ3_2_1 
                objSchool                                                          7
                      := TSchool.create 
                           Gebruik drie argumente in regte volgorde 
                           (sSkoolNaam, iAantLeerders, bPubliekeSkool)

                Vertoon objek objSchool in redQ3 deur toString-metode te
                gebruik 
 3.2.2          Knoppie [3.2.2 – Rating]
                Onttrek getal leerders wat geslaag het uit spnQ3_2_2 
                Roep updateRating                                                  4
                                 met regte argument 
                Vertoon objSchool in redQ3 deur toString-metode te
                gebruik 
 3.2.3          Knoppie [3.2.3 – Funding]
                Toets of getPublicSchool = TRUE 
                  Vertoon in redQ3 met boodskap
                  Roep calcFunding-metode                                          5
                       Geformateer in geldeenheid (currency) 
                Anders
                  Vertoon boodskap – No funding available 
                                                       Subtotaal Vormklas:         16

                                                     TOTAAL AFDELING C:            40
Kopiereg voorbehou                                                              Blaai om asseblief

### Page 9

Downloaded from hlayiso.com
Inligtingstegnologie/V1                                 9                               DBE/November 2023
                                                NSS – Nasienriglyne

BYLAAG D
VRAAG 4: NASIENRUBRIEK – PROBLEEMOPLOSSING
SENTRUMNOMMER:                                            EKSAMENNOMMER:
                                                                                             MAKS.       LEERDER-
  VRAAG                                    BESKRYWING
                                                                                             PUNTE         PUNT
4.1            Knoppie [4.1 – Codes]
               Lus ('loop') van 1 tot lengte van skikking (of 5) 
                 Inisialiseer sReel  leë string 
                 Lus ('loop') van 1 tot  die lengte van kode 
                    Toets of karakter in die kode 
                       'n letter ('a'.. 'z' OR 'A'.. 'Z' )  of 'n syfer ('0'.. '9' )  is
                          Voeg die karakter by die sReel-afvoerstring 
                 Eindig binneste lus
                 Bepaal die aantal spesiale karakters wat verwyder is
                 Lengte(arrCodes[i]) – Lengte(sLine) 
                       // Of gebruik 'n teller in die binneste lus
                 Voeg die sReel-kode  in die list box
                        in die regte format met hakies en aantal karakters
               wat verwyder is                                                                12
               Eindig buitenste lus

               Konsepte:

               Buitenste i lus (1 tot 5) (1)
                Binneste j lus (1 tot lengte(arrCodes[i])) (2)
                   Toets karakter [i][j] (1)
                     as getal OF letter (2)
                       Verwyder karakters / bou string (2)
                       Tel karakters verwyder (2)
                Voeg nuwe kode by op lstQ4_1 (1)
                   en aantal karakters verwyder (1)

4.2.1          Knoppie [4.2.1 – Extra IT periods]

               Lus ('loop') iCnt van 1 tot 4 (Maandag – Donderdag) 
                      Stel teller op 1 
                      Terwyl (die sel nie leeg is nie) 
                           Vermeerder teller met 1 
                      Ken 'IT'  toe aan arrTimeTable[iCnt, teller] 
               Eindig lus
                                                                                                6
               Konsepte:
               Lus deur die dae van 1 tot 4 (1) // aanvaar ook 1 tot 5
               Voorwaardelike lus/’Break’-stelling met for-lus (1)
                 Bepaal indeks van (1)
                  eerste leë spasie in 'n ry (1)
               Ken nuwe waarde aan leë spasie toe (2)

Kopiereg voorbehou                                                                           Blaai om asseblief

### Page 10

Downloaded from hlayiso.com
Inligtingstegnologie/V1                          10                        DBE/November 2023
                                         NSS – Nasienriglyne

4.2.2          Knoppie [4.2.2 – Group IT]
               Lus I van 1 tot 4 (Maandag – Donderdag) 
                 Inisialiseer Teller 
                 Lus J van 1 tot lengte van arrTimeTable[I] 
                   As arrTimeTable[I, J] = 'IT' 
                     As Teller = 1 
                       Stoor indeks J (J1) by eerste voorkoms van 'IT' 
                     As Teller = 2 
                       Stoor indeks J (J2)by tweede voorkoms van 'IT' 
                      // ruil ander vakkode met IT
                  Stel sTemp  na arrTimeTable[I, J1+1 ] 
                  Stel arrTimeTable[I, J1+1] na arrTimeTable[I,J2] 
                  Stel arrTimeTable[I, J2] na sTemp 
                 Eindig binneste lus
               Eindig buitenste lus                                               12

               Konsepte

               Lus deur rye (1 tot 4) //1
                 Bepaal die posisie van die eerste voorkoms van IT:
                 Inisialiseer/skep Teller-veranderlike van 1ste posisie//1
                 Lus deur die kolomme //1
                   Toets of die selwaarde = 'IT' //1
                       Stoor/bepaal die indeks/posisie van 1st voorkoms //2
                 Bepaal die posisie van die tweede voorkoms van IT:
                       Stoor/bepaal die indeks/posisie van 2de voorkoms //2

               Ruil die vakkode na die eerste voorkoms met die tweede
               voorkoms van IT //4

                                                   TOTAAL AFDELING D:             30

OPSOMMING VAN LEERDER SE PUNTE:

 SENTRUMNOMMER:                        LEERDER SE EKSAMENNOMMER:

                     AFDELING A     AFDELING B      AFDELING C     AFDELING D
                                                                                           GROOT-
                          VRAAG 1    VRAAG 2         VRAAG 3         VRAAG 4
                                                                                           TOTAAL
     MAKS.
                            40           40              40                30                 150
     PUNTE
 LEERDER SE
   PUNTE

Kopiereg voorbehou                                                              Blaai om asseblief

### Page 11

Downloaded from hlayiso.com
Inligtingstegnologie/V1                  11              DBE/November 2023
                                 NSS – Nasienriglyne

BYLAAG E: OPLOSSING VIR VRAAG 1

unit Question1_u;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Forms,
  Dialogs, StdCtrls, ExtCtrls, Spin, pngimage, Math;

type
  TfrmQuestion1 = class(TForm)
     grpQ1_2: TGroupBox;
     btnQ1_2: TButton;
     grpQ1_1: TGroupBox;
     edtQ1_1: TEdit;
     spnQ1_1: TSpinEdit;
     lblQ1_1_Name: TLabel;
     lblQ1_1_Age: TLabel;
     btnQ1_1: TButton;
     grpQ1_3: TGroupBox;
     imgQ1_3: TImage;
     btnQ1_3: TButton;
     edtQ1_3: TEdit;
     Label3: TLabel;
     grpQ1_5: TGroupBox;
     Label4: TLabel;
     Label5: TLabel;
     cmbQ1_5: TComboBox;
     btnQ1_5: TButton;
     grpQ1_: TGroupBox;
     btnQ1_4: TButton;
     pnlQ1_5: TPanel;
     Label6: TLabel;
     edtQ1_2: TEdit;
     memQ1_2: TMemo;
     lblQ1_4: TLabel;
     procedure btnQ1_1Click(Sender: TObject);
     procedure btnQ1_2Click(Sender: TObject);
     procedure btnQ1_3Click(Sender: TObject);
     procedure btnQ1_4Click(Sender: TObject);
     procedure btnQ1_5Click(Sender: TObject);

   private
     { Private declarations }
   public
     { Public declarations }
   end;

var
  frmQuestion1: TfrmQuestion1;

implementation

{$R *.dfm}

Kopiereg voorbehou                                          Blaai om asseblief

### Page 12

Downloaded from hlayiso.com
Inligtingstegnologie/V1                   12                  DBE/November 2023
                                  NSS – Nasienriglyne

// ===========================================================================
// 1.1 Display name and age                                            5 marks
// ===========================================================================

procedure TfrmQuestion1.btnQ1_1Click(Sender: TObject);
var
  sName: String;
  iAge: integer; // Provided code
begin
  sName := edtQ1_1.Text;
  iAge := spnQ1_1.Value;
  ShowMessage(sName + #13 + IntToStr(iAge));
end;

// ===========================================================================
// 1.2 Hockey teams                                                    9 marks
// ===========================================================================

procedure TfrmQuestion1.btnQ1_2Click(Sender: TObject);
const
  PLAYERS = 11;
var
  iAantLeerders, iAantSpanne, iAantReserves: integer;
begin
  // Provided code
  memQ1_2.Clear;
  //---------------------------------------------
  iAantLeerders := StrToInt(edtQ1_2.Text);
  iAantSpanne := iAantLeerders DIV PLAYERS;
  iAantReserves := iAantLeerders MOD PLAYERS;
  memQ1_2.Lines.Add('Number of hockey teams: ' + IntToStr(iAantSpanne));
  memQ1_2.Lines.Add('Number of learners on reserve list: ' + IntToStr
      (iAantReserves));end;

// ===========================================================================
// 1.3 Calculate                                                       5 marks
// ===========================================================================

procedure TfrmQuestion1.btnQ1_3Click(Sender: TObject);
var
  rX, rY: real; // Provided code
  rD: real;
begin
  // Provided code
  rX := 12.46;
  rY := 8.54;

  rD := sqrt(power((rX - rY), 4));
  edtQ1_3.Text := FloatToStrF(rD, ffFixed, 8, 3);
end;

Kopiereg voorbehou                                                Blaai om asseblief

### Page 13

Downloaded from hlayiso.com
Inligtingstegnologie/V1                   13                  DBE/November 2023
                                  NSS – Nasienriglyne

// ===========================================================================
// 1.4 Marathon results                                                6 marks
// ===========================================================================

procedure TfrmQuestion1.btnQ1_4Click(Sender: TObject);
var
  iPosisie: integer; // Provided code
begin
// Provided code
  iPosisie := StrToInt(InputBox('Marathon results',
       'Enter the position the athlete achieved', '1'));
// ----------------------------------------------------
  case iPosisie of
     1:       lblQ1_4.Caption := 'You receive a gold medal.';
     2, 3:    lblQ1_4.Caption := 'You receive a silver medal.';
     4 .. 20: lblQ1_4.Caption := 'You receive a bronze medal.'
     else lblQ1_4.Caption := 'You receive a participation certificate.';
  end;
end;

// ===========================================================================
// 1.5 Average mark                                                   15 marks
// ===========================================================================

procedure TfrmQuestion1.btnQ1_5Click(Sender: TObject);
var
  tLeer: TextFile;
  sReel: String;
  iTotaal, iPunt, iTel, iPosHash: integer;
  rGemid: real;
begin
  iTotaal := 0;
  iTel := 0;
  AssignFile(tLeer, 'Details.txt');
  Reset(tLeer);
  while NOT(eof(tLeer))do
    begin
       readln(tLeer, sReel);
       iPosHash := pos('#', sReel);
       iPunt := StrToInt(copy(sReel, iPosHash + 1));
       iTotaal := iTotaal + iPunt;
       inc(iTel);
    end;
  closeFile(tLeer);
  rGemid := iTotaal / iTel;
  pnlQ1_5.Caption := FloatToStrF(rGemid, ffFixed, 3, 0);
end;

end.

Kopiereg voorbehou                                                Blaai om asseblief

### Page 14

Downloaded from hlayiso.com
Inligtingstegnologie/V1                   14                   DBE/November 2023
                                  NSS – Nasienriglyne

BYLAAG F: OPLOSSING VIR VRAAG 2

// ==============================================================================
// 2.1 – Afdeling: SQL-stellings
// ==============================================================================

// ==============================================================================
// 2.1.1 Large courses                                                    3 marks
// ==============================================================================

       sSQL1 := 'SELECT * ' +
                'FROM tblCourses ' +
                'WHERE MaxStudents > 99';

// ==============================================================================
// 2.1.2 Lecturer gender                                                  4 marks
// ==============================================================================

       sSQL2 := 'SELECT LecturerName, LecturerSurname, ' +
                'Left(Gender, 1) AS [Gender (M/F)]' +
                'FROM tblLecturers';

// ==============================================================================
// 2.1.3 Multilingual lecturers                                          6 marks
// ==============================================================================

     sSQL3 := 'SELECT CourseID, CourseName ' +
               'FROM tblLecturers , tblCourses ' +
               'WHERE (tblLecturers.LecturerID = tblCourses.LecturerID) AND
                (Multilingual = True) ' +
               'ORDER BY CourseName';
// ==============================================================================
// 2.1.4 Lecturer salaries                                                5 marks
// ==============================================================================

       sSQL4 := 'SELECT LecturerID, ' +
                'FORMAT(Count(*)*10000, "CURRENCY") ' +
                'AS [Salary] ' +
                'FROM tblCourses ' +
                'GROUP BY LecturerID';

// ==============================================================================
// 2.1.5 Change online option                                             4 marks
// ==============================================================================

       sSQL5 := 'UPDATE tblCourses SET OnlineOption = FALSE ' +
                'WHERE CourseName LIKE "%Programming%"';

Kopiereg voorbehou                                                Blaai om asseblief

### Page 15

Downloaded from hlayiso.com
Inligtingstegnologie/V1                   15                   DBE/November 2023
                                  NSS – Nasienriglyne

// ==============================================================================
// 2.2 – Afdeling: Delphi-kode
// ==============================================================================

// ==============================================================================
// 2.2.1 Average duration of courses                                     14 marks
// ==============================================================================
procedure TfrmQuestion2.btnQ2_2_1Click(Sender: TObject);
var
  iTelKursusse, iSomTydsduur: integer;
  rGemTydsduur: real;
begin
  // Provided code
  redQ2_2_1.Clear;

   // 2.2.1 Average duration of courses

  tblLecturers.First;
  while NOT tblLecturers.Eof do
  begin
     redQ2_2_1.Lines.Add(tblLecturers['LecturerID'] + ': ' + tblLecturers
         ['LecturerName'] + ' ' + tblLecturers['LecturerSurname']);
     tblCourses.First;
     iTelKursusse := 0;
     iSomTydsduur := 0;
     while NOT tblCourses.Eof do
     begin
       if tblLecturers['LecturerID'] = tblCourses['LecturerID'] then
       begin
         inc(iTelKursusse);
         redQ2_2_1.Lines.Add(IntToStr(iTelKursusse) + '. ' + tblCourses
             ['CourseName']);
         iSomTydsduur := iSomTydsduur + tblCourses['Duration'];
       end;
       tblCourses.Next;
     end;
     rGemTydsduur := iSomTydsduur / iTelKursusse;
     redQ2_2_1.Lines.Add('Average duration of courses: ' + #9 + FloatToStrF
         (rGemTydsduur, ffFixed, 8, 2) + #13);
     tblLecturers.Next;
  end;
end;
// ==============================================================================
// 2.2.2 Register new lecturer                                            4 marks
// ==============================================================================
procedure TfrmQuestion2.btnQ2_2_2Click(Sender: TObject);
begin
  tblLecturers.Insert;
  tblLecturers['LecturerID'] := 'ZT032';
  tblLecturers['LecturerName'] := 'Zander';
  tblLecturers['LecturerSurname'] := 'Thomas';
  tblLecturers['Gender'] := 'Male';
  tblLecturers['Multilingual'] := True;
  tblLecturers.Post;
end;

Kopiereg voorbehou                                                Blaai om asseblief

### Page 16

Downloaded from hlayiso.com
Inligtingstegnologie/V1                   16                   DBE/November 2023
                                  NSS – Nasienriglyne

// ===========================================================================
// {$ENDREGION}
// ===========================================================================
// {$REGION 'Provided code: Setup DB connections - DO NOT CHANGE!'}
// ===========================================================================

procedure TfrmQuestion2.FormClose(Sender: TObject; var Action:
TCloseAction);
begin
  // Disconnects from database and closes all open connections
  dbCONN.dbDisconnect;
end;

procedure TfrmQuestion2.FormCreate(Sender: TObject);
begin
  redQ2_2_1.Paragraph.TabCount := 2;
  redQ2_2_1.Paragraph.Tab[0] := 100;
  redQ2_2_1.Paragraph.Tab[1] := 150;
  redQ2_2_1.Paragraph.Tab[2] := 200;
end;

procedure TfrmQuestion2.FormShow(Sender: TObject);
begin
  // Sets up the connection to database and opens the tables.
  dbCONN := TConnection.Create;
  dbCONN.dbConnect;
  tblLecturers := dbCONN.tblOne;
  tblCourses := dbCONN.tblMany;
  dbCONN.setupGrids(dbgLecturers, dbgCourses, dbgrdSQL);
  pgcDBAdmin.ActivePageIndex := 0;
end;
// ===========================================================================
// {$ENDREGION}

end.

Kopiereg voorbehou                                               Blaai om asseblief

### Page 17

Downloaded from hlayiso.com
Inligtingstegnologie/V1                   17                  DBE/November 2023
                                  NSS – Nasienriglyne

BYLAAG G: OPLOSSING VIR VRAAG 3

Objekklas:

unit School_U;

interface

type
  TSchool = class(TObject)
  private
  var
     fSchoolName: String;
     fTotalLearners: Integer;
     fPublicSchool: boolean;
     fRating: char;
  public
     // Provide code
     constructor create(sSchoolName: String; iTotalLearners: integer;
       bPublicSchool: Boolean);
     // Code here

     function getPublicSchool: boolean;
     procedure updateRating(iLearnersPassed: integer);
     function calcFunding: real;
     function toString: String;
   end;

implementation

uses
  SysUtils, Math;
// ===========================================================================
// 3.1.1 Constructor Create                                            3 marks
// ===========================================================================

constructor TSchool.create(sSchoolName: String; iTotalLearners: integer;
  bPublicSchool: boolean);
begin
  // 3.1.1 Contructor Create
  fSchoolName := sSchoolName;
  fTotalLearners := iTotalLearners;
  fPublicSchool := bPublicSchool;
  fRating := 'Z';
end;
// ===========================================================================
// 3.1.2 Function getPublicSchool                                      2 marks
// ===========================================================================

function TSchool.getPublicSchool: boolean;
begin
  Result := fPublicSchool;
end;

Kopiereg voorbehou                                               Blaai om asseblief

### Page 18

Downloaded from hlayiso.com
Inligtingstegnologie/V1                   18                   DBE/November 2023
                                  NSS – Nasienriglyne

// ===========================================================================
// 3.1.3 Procedure updateRating                                        8 marks
// ===========================================================================

procedure TSchool.updateRating(iLeerdersGeslaag: integer);
var
  rSlaagPer: real;
begin
  rSlaagPer := iLeerdersGeslaag / fTotalLearners * 100;

  if rSlaagPer >= 80 then
  begin
     fRating := 'A';
  end
  else if (rSlaagPer >= 60) AND (rSlaagPer < 80) then
  begin
     fRating := 'B';
  end
  else
  begin
     fRating := 'C';
  end;
end;

// ===========================================================================
// 3.1.4 Function calcFunding                                          4 marks
// ===========================================================================

function TSchool.calcFunding: real;
var
  rFondse: real;
begin
  rFondse := 145.50 * fTotalLearners;
  Result := rFondse;
end;function TSchool.calcFunding: real;

// ===========================================================================
// 3.1.5 Function toString                                             7 marks
// ===========================================================================

function TSchool.toString: String;
var
  sAfvoerStr: String;
begin
  sAfvoerStr := fSchoolName + #13 + '---------------------------' + #13;
  sAfvoerStr := sAfvoerStr + 'Total number of learners: ' +
      IntToStr(fTotalLearners)+ #13;
  sAfvoerStr := sAfvoerStr + 'Rating: ' + fRating + #13;
  if fPublicSchool then
     sAfvoerStr := sAfvoerStr + 'Public school ' + #13
  else
     sAfvoerStr := sAfvoerStr + 'Private school ' + #13;
  Result := sAfvoerStr;
end;

end.
Kopiereg voorbehou                                               Blaai om asseblief

### Page 19

Downloaded from hlayiso.com
Inligtingstegnologie/V1                  19              DBE/November 2023
                                 NSS – Nasienriglyne

Hoofvormeenheid:

unit Question3_U;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Forms,
  Dialogs, StdCtrls, CheckLst, ExtCtrls, Buttons, Spin, ComCtrls, jpeg;

type
  TfrmQuestion3 = class(TForm)
     gbxQ3_2_1: TGroupBox;
     gbxQ3_2_3: TGroupBox;
     redQ3: TRichEdit;
     btnQ3_2_1: TButton;
     gbxQ3_2_2: TGroupBox;
     btnQ3_2_2: TButton;
     Panel1: TPanel;
     Panel2: TPanel;
     btnQ3_2_3: TButton;
     Image1: TImage;
     Label6: TLabel;
     edtQ3_2_1: TEdit;
     Label2: TLabel;
     spnQ3_2_1: TSpinEdit;
     chbQ3_2_1: TCheckBox;
     Label1: TLabel;c
     sedQ3_2_2: TSpinEdit;
     procedure btnQ3_2_1Click(Sender: TObject);
     procedure btnQ3_2_2Click(Sender: TObject);
     procedure btnQ3_2_3Click(Sender: TObject);
  private

   public

   end;

var
  frmQuestion3: TfrmQuestion3;

implementation

{$R *.dfm}

uses
  School_U;

var
  objSchool: TSchool;

Kopiereg voorbehou                                          Blaai om asseblief

### Page 20

Downloaded from hlayiso.com
Inligtingstegnologie/V1                   20                   DBE/November 2023
                                  NSS – Nasienriglyne

// ===========================================================================
// 3.2.1 Instantiate object                                            7 marks
// ===========================================================================

procedure TfrmQuestion3.btnQ3_2_1Click(Sender: TObject);
var
  sSchoolName : String;
  iNumLearners : integer;
  bPublicSchool : boolean;
begin
  // Provided code
  redQ3.Clear;

   // 3.2.1 Instantiate object
   sSchoolName := edtQ3_2_1.Text;
   iNumLearners := spnQ3_2_1.Value;
   bPublicSchool := chbQ3_2_1.Checked;

  objSchool := TSchool.create(sSchoolName, iNumLearners, bPublicSchool);
  redQ3.Lines.Add(objSchool.toString);
end;
// ===========================================================================
// 3.2.2 Rating                                                        4 marks
// ===========================================================================

procedure TfrmQuestion3.btnQ3_2_2Click(Sender: TObject);
var
  iAantGeslaag: integer;
begin
  // Provided code
  redQ3.Clear;

  // 3.2.2 Rating
  iAantGeslaag := spnQ3_2_2.Value;
  objSchool.updateRating(iAantGeslaag);
  redQ3.Lines.Add(objSchool.toString);
end;

// ===========================================================================
// 3.2.3 Funding                                                       5 marks
// ===========================================================================

procedure TfrmQuestion3.btnQ3_2_3Click(Sender: TObject);
begin

  // 3.2.3 Funding
  if objSchool.getPublicSchool then
     redQ3.Lines.Add('Public school will receive ' + FloatToStrF
         (objSchool.calcFunding, ffCurrency, 8, 2))
  else
       redQ3.Lines.Add('No funding available ');
end;

end.

Kopiereg voorbehou                                               Blaai om asseblief

### Page 21

Downloaded from hlayiso.com
Inligtingstegnologie/V1                  21               DBE/November 2023
                                 NSS – Nasienriglyne

BYLAAG H: OPLOSSING VIR VRAAG 4

unit Question4_U;

interface

uses
  Windows, Messages, SysUtils, Variants,
  Classes, Graphics,
  Controls, Forms, Dialogs, StdCtrls, ComCtrls,
  ExtCtrls, jpeg, math;

type
  TfrmQuestion4 = class(TForm)
     Panel1: TPanel;
     Panel2: TPanel;
     btnQ4_2_2: TButton;
     redQ4: TRichEdit;
     GroupBox1: TGroupBox;
     btnQ4_2_1: TButton;
     pgcQ4: TPageControl;
     tshQ4_1: TTabSheet;
     tshQ4_2: TTabSheet;
     btnQ4_1: TButton;
     lstQ4_1: TListBox;
     GroupBox2: TGroupBox;
     procedure btnQ4_2_2Click(Sender: TObject);
     procedure FormShow(Sender: TObject);
     procedure btnQ4_2_1Click(Sender: TObject);
     procedure btnQ4_1Click(Sender: TObject);

  private
    { Private declarations }
  public
    { Public declarations }
    procedure populate;
    procedure display;
  end;
var
  frmQuestion4: TfrmQuestion4;

   // Provided code for Question 4.1
   arrCodes: array [1 .. 5] of String =
            ('An7J*Q#D&N', 'pL78K#$.%BV', '89@FGh0&Y56#$Q','Bn4m321&*#T',
             'P2QwER%$#a');

  // Provided code for Question 4.2
  arrDays: array [1 .. 5] of String = ('Mon.', 'Tue.', 'Wed.', 'Thu.',
'Fri.');
  arrSubjectCodes: array [1 .. 5] of String =
                                      ('IT','HL', 'ACC', 'PHY', 'MAT' );
  arrTimeTable: array [1 .. 5, 1 .. 7] of String;

implementation

Kopiereg voorbehou                                           Blaai om asseblief

### Page 22

Downloaded from hlayiso.com
Inligtingstegnologie/V1                   22                   DBE/November 2023
                                  NSS – Nasienriglyne

// ==============================================================================
// 4.1 Codes                                                            12 marks
// ==============================================================================
procedure TfrmQuestion4.btnQ4_1Click(Sender: TObject);
var
  I, J, iAantSpesKar: integer;
  sReel: String;
begin
  // 4.1 Codes
  for I := 1 to length(arrCodes) do
  begin
     sReel := '';
     for J := 1 to length(arrCodes[I]) do
     begin
       if arrCodes[I][J] IN ['A' .. 'Z', 'a' .. 'z', '0' .. '9'] then
       begin
         sReel := sReel + arrCodes[I][J];
       end;
     end;
     iAantSpesKar := length(arrCodes[I]) - length(sReel);
     lstQ4_1.Items.Add(sReel + '(' + intToStr(iAantSpesKar) + ')');
  end;
end;

// ==============================================================================
// 4.2.1 Extra IT periods                                             6 marks
// ==============================================================================
procedure TfrmQuestion4.btnQ4_2_1Click(Sender: TObject);
var
  iRy, iKol: integer;
begin
  // 4.2.1 Extra IT periods
  for iRy := 1 to 4 do
  begin
     iKol := 1;
     While NOT(arrTimeTable[iRy, iKol] = '') do
     begin
       inc(iKol);
     end;
     arrTimeTable[iRy, iKol] := 'IT';
  end;
  // Provided code
  display;
end;

// ==============================================================================
// 4.2.2 Group IT                                                       12 marks
// ==============================================================================
procedure TfrmQuestion4.btnQ4_2_2Click(Sender: TObject);
var
  I: integer;
  J: integer;
  iTel, iEerste, iTweede: integer;
  sTemp: String;

begin

Kopiereg voorbehou                                               Blaai om asseblief

### Page 23

Downloaded from hlayiso.com
Inligtingstegnologie/V1                   23                   DBE/November 2023
                                  NSS – Nasienriglyne

  // 4.2.2 Group IT
  for I := 1 to 4 do
  begin
     iTel := 0;
     for J := 1 to 7 do
     Begin
       if arrTimeTable[I, J] = 'IT' then
       begin
         inc(iTel);
         if iTel = 1 then
           iEerste := J + 1;
         if iTel = 2 then
         begin
           iTweede := J;
           sTemp := arrTimeTable[I, iEerste];
           arrTimeTable[I, iEerste] := arrTimeTable[I, iTweede];
           arrTimeTable[I, iTweede] := sTemp;
         end;
       end;
     end;
  end;
  // Provided code
  display;
end;

// ==============================================================================
// Provided code – Do not change
// ==============================================================================

procedure TfrmQuestion4.populate;
var
  sSubjCode: String;
  iPeriod, iRand, iRow, iCol, iCnt: integer;
  arrLocal: array [1 .. 5] of String;
begin
  for iCnt := 1 to 5 do
  begin
     repeat
       iRand := RandomRange(1, 6);
       if length(arrLocal[iRand]) = 0 then
         arrLocal[iCnt] := arrSubjectCodes[iCnt];
     until length(arrLocal[iCnt]) > 0;
  end;
  for iCol := 1 to 5 do
  begin
     for iRow := 1 to 5 do
     begin
       repeat
         iRand := RandomRange(1, 8);
       until (arrTimeTable[iRow, iRand] = '');
       arrTimeTable[iRow, iRand] := arrLocal[iCol];
     end;
  end;
  display;
end;

Kopiereg voorbehou                                               Blaai om asseblief

### Page 24

Downloaded from hlayiso.com
Inligtingstegnologie/V1                   24                  DBE/November 2023
                                  NSS – Nasienriglyne

procedure TfrmQuestion4.FormShow(Sender: TObject);
begin
  redQ4.Paragraph.TabCount := 9;
  redQ4.Paragraph.Tab[0] := 50;
  redQ4.Paragraph.Tab[1] := 100;
  redQ4.Paragraph.Tab[2] := 150;
  redQ4.Paragraph.Tab[3] := 200;
  redQ4.Paragraph.Tab[4] := 250;
  redQ4.Paragraph.Tab[5] := 300;
  redQ4.Paragraph.Tab[6] := 350;
  redQ4.Paragraph.Tab[7] := 400;
  redQ4.Paragraph.Tab[8] := 450;
  display;
  populate;
end;

procedure TfrmQuestion4.display;
var
  iRow, iCol, iCnt: integer;
  sLine: String;
begin
  sLine := #9;
  for iCnt := 1 to 7 do
     sLine := sLine + intToStr(iCnt) + #9;
  redQ4.Clear;
  redQ4.Lines.Add(sLine);
  for iRow := 1 to 5 do
  begin
     sLine := arrDays[iRow];
     for iCol := 1 to 7 do
     begin
       sLine := sLine + #9 + arrTimeTable[iRow, iCol];
     end;
     redQ4.Lines.Add(sLine);
  end;
end;

// ========================================================
// End of provided code
// ========================================================

end.

Kopiereg voorbehou

## Related documents

- [Information Technology P1 Nov 2023 Eng](https://www.hlayiso.com/library/information-technology-p1-nov-2023-eng/8ae9d306-1975-4759-ad2b-96483154bd10) — Information Technology · QP · 2023 · Eng
- [Information Technology P1 May-June 2023 MG Eng](https://www.hlayiso.com/library/information-technology-p1-may-june-2023-mg-eng/f868554b-8f4f-4370-aa4e-cfa745fc806d) — Information Technology · Memo · 2023 · Eng
- [IT P1 Nov 2020 Afr REWRITE (NO MEMO)](https://www.hlayiso.com/library/it-p1-nov-2020-afr-rewrite-no-memo/50e776f8-b245-4554-9243-5cf350cf10d2) — Information Technology · Memo · 2020 · Afr
- [IT P1 Nov 2020 Memo Afr](https://www.hlayiso.com/library/it-p1-nov-2020-memo-afr/85279e2b-2e1a-44a8-a2ac-7db9df151ff7) — Information Technology · Memo · 2020 · Afr
- [Information Technology P1 Nov 2017 Memo Eng](https://www.hlayiso.com/library/information-technology-p1-nov-2017-memo-eng/5a6ed3b8-fff3-4502-bac4-5e1e988da4fc) — Information Technology · Memo · 2017 · Eng
- [Information Technology P1 Nov 2015 Memo Afr](https://www.hlayiso.com/library/information-technology-p1-nov-2015-memo-afr/ed0f17ad-2120-4f04-b0c6-56098d626046) — Information Technology · Memo · 2015 · Afr

## More from Grade 12 Information Technology

- [IT-P2-GR12 QP-Afr-SEP-2025 watermark](https://www.hlayiso.com/library/it-p2-gr12-qp-afr-sep-2025-watermark/569cc299-ae7c-4635-9514-cf03f9242ebc) — QP · 2025 · Afr
- [IT P2 QP GR12 SEPT 2024 AFR](https://www.hlayiso.com/library/it-p2-qp-gr12-sept-2024-afr/9016098b-e233-49f4-b1dc-f0838363c6af) — QP · 2024 · Afr
- [IT P2 QP GR12 SEPT 2024 English](https://www.hlayiso.com/library/it-p2-qp-gr12-sept-2024-english/83309154-2856-47f1-82cc-cc04c8ab38b1) — QP · 2024 · Eng
- [Information Technology P1 Nov 2024 Afr](https://www.hlayiso.com/library/information-technology-p1-nov-2024-afr/f4b19c44-77ce-482a-9f85-438813c25f87) — QP · 2024 · Afr
- [Information Technology P2 Nov 2024 Eng](https://www.hlayiso.com/library/information-technology-p2-nov-2024-eng/3afa20d1-1c0f-4969-8a56-d690e9b24d70) — QP · 2024 · Eng
- [Information Technology P1 May-June 2023 Eng](https://www.hlayiso.com/library/information-technology-p1-may-june-2023-eng/896eee2c-884c-4527-97e2-ed0759edd97d) — QP · 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.
