# Information Technology Grade 12 P1 NSC November 2025 Memo

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

- Page: https://www.hlayiso.com/library/grade-12-information-technology-2025-nsc-november-exam-memorandum-paper-1/e46a7fb3-a316-45a3-b718-0845038c9385
- Updated: 2026-09-28
- Subject: Information Technology
- Grade: Grade 12
- Document type: Memorandum
- Year: 2025
- Exam period: NSC November Exam
- Paper: 1
- Curriculum: CAPS
- Pages: 27

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 2025 Memo](https://www.hlayiso.com/library/grade-12-information-technology-2025-nsc-november-exam-memorandum-paper-1/e46a7fb3-a316-45a3-b718-0845038c9385)

## About this document

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

NATIONAL
                              SENIOR CERTIFICATE

SENIOR CERTIFICATE
                                     GRADE 12

                         INFORMATION TECHNOLOGY P1

                                  NOVEMBER 2025

                               MARKING GUIDELINES

MARKS: 150

                     These marking guidelines consist of 27 pages.

Copyright reserved                                                   Please turn over

### Page 2

Information Technology/P1                       2                              DBE/November 2025
                                     NSC – Marking Guidelines

 GENERAL INFORMATION:

 •   These marking guidelines are to be used as the basis for the marking session. They
     were prepared for use by markers. All markers are required to attend a rigorous
     standardisation meeting to ensure that the guidelines are consistently interpreted
     and applied in the marking of candidates' work.

 •   Note that learners who provide an alternate correct solution to that given as example
     of a solution in the marking guidelines will be given full credit for the relevant solution,
     unless the specific instructions in the paper was not followed or the requirements of
     the question was not met

 •   Annexures A, B, C and D (pages 3 to 12) include the marking grid for each question.

 •   Annexures E, F, G and H (pages 13 to 27) contain examples of solutions for
     Questions 1 to 4 in programming code.

 •   Copies of Annexures A, B, C, D and the summary for the marks of the learner
     (pages 3 to 12) should be made for each learner and completed during the marking
     session.

Copyright reserved                                                                 Please turn over

### Page 3

Information Technology/P1                      3                         DBE/November 2025
                                    NSC – Marking Guidelines

ANNEXURE A

QUESTION 1: MARKING GRID – GENERAL PROGRAMMING SKILLS

 CENTRE NUMBER:                               EXAMINATION NUMBER:
                                                                               MAX. LEARNER'S
QUESTION                              DESCRIPTION
                                                                              MARKS   MARKS
 1.1          Button [1.1 - Increase value]

              Extract the number from pnlQ1_1 ✓
              Convert to integer ✓                                               4
              Increase the number by 1 ✓
              Display the number in pnlQ1_1 converted to string ✓

 1.2          Button [1.2 - Volume]

              Extract the length of the one side from spnQ1_2 ✓
              Calculate volume:
               rVolume :=
                  5 * ✓ (3 + SQRT(5)) ✓/ 12 ✓ * Power(iSide,3) ✓
                                                                                 6
              Display volume in edtQ1_2 converted to a string and
              formatted to 2 decimal places ✓

              NOTE: Any TWO mathematical functions can be used.

 1.3          Button [1.3 - Shopping aisle]

              Extract the code from edtQ1_3 ✓
              Find the position of hash (#) (or other mechanism to separate
                   the aisle number from the category) ✓
              Extract aisle number ✓
              Extract/use the category as character ✓
              Use a Case correctly ✓                                            11
                 For all possible characters ✓ (‘F’, ‘D’, ‘B’, ‘S’, ‘P’) ✓
                 to determine category description ✓

              Compile a string with "Aisle ", aisle number ✓, ": "
                 and category description ✓
              Display the string in lblQ1_3 ✓

Copyright reserved                                                            Please turn over

### Page 4

Information Technology/P1                    4                        DBE/November 2025
                                  NSC – Marking Guidelines

 1.4          Button [1.4 - Populate and display]

              Loop from 1 to length of array ✓
                Generate random numbers ✓ in correct range (1 – 15) ✓
                Assign the random number to each element in the array ✓        8
                Concatenate the array values to build the string ✓
                   separating the values with a dash (-) ✓
              Mechanism to deal with extra dash ✓
              Display the concatenated string in memQ1_4 ✓

 1.5          Button [1.5 - Determine HCF]

              Test IF Num1 < Num2 ✓
                Assign Num1 to LowerNum ✓
              Else
                Assign Num2 to LowerNum ✓

              //Use of the While loop
              Cnt = 1; ✓
              While Cnt <= LowerNum ✓
                 Test IF ✓ Num1 MOD Cnt = 0 ✓
                    Test IF Num2 MOD Cnt = 0 ✓                                 11
                      HCF = Cnt ✓
                 Inc(Cnt) ✓
              Display HCF in edtQ1_5 ✓

              //Alternative using the FOR… loop
              Loop Cnt (1) from 1 to (1) LowerNum (1)
                 Test IF (1) Num1 MOD Cnt = 0 (1)
                    Test IF Num2 MOD Cnt = 0 (1)
                      HCF = Cnt (1)
              Display HCF in edtQ1_5 (1)

                                                        TOTAL SECTION A:       40

Copyright reserved                                                         Please turn over

### Page 5

Information Technology/P1                     5                     DBE/November 2025
                                   NSC – Marking Guidelines

ANNEXURE B

QUESTION 2: MARKING GRID – SQL AND DATABASE PROGRAMMING

 CENTRE NUMBER:                               EXAMINATION NUMBER:
                                                                       MAX.     LEARNER'S
QUESTION                            DESCRIPTION                       MARKS       MARKS
 2.1          SQL statements
 2.1.1        Button [2.1.1 - Farm details]
              SELECT FarmName, NearestTown, SizeInHectares ✓
              FROM tblFarms ✓                                            3
              ORDER BY SizeInHectares DESC ✓

 2.1.2        Button [2.1.2 - Contact details]
              SELECT FullName, ContactNumber
              FROM tblFarmOwners ✓
              WHERE Email IS NULL ✓                                      2
              Alternative:
              ISNULL(Email)

 2.1.3        Button [2.1.3 - Average farm size]
              SELECT FarmType,
              FORMAT(AVG(SizeInHectares) ✓,"0.00" ✓)
              AS AverageSize ✓
              FROM tblFarms
              WHERE FarmType = ✓ "' + sFarmType + '" ✓                   6
              GROUP BY FarmType ✓

             Alternative:
             FarmType = '+ QuotedStr(sFarmType) +'
             FarmType LIKE "' + sFarmType + '"

 2.1.4        Button [2.1.4 - Young farm owners]
              SELECT Fullname, DateOfBirth, ✓
              INT ✓ ((NOW ✓ - DateOfBirth) /365 ✓) AS Age
              FROM tblFarmOwners ✓
              WHERE INT((NOW - DateOfBirth)/365) ✓ <= 25 ✓               7

              Alternative:
              (Date() - DateOfBirth)

Copyright reserved                                                    Please turn over

### Page 6

Information Technology/P1                      6                           DBE/November 2025
                                    NSC – Marking Guidelines

 2.1.5        Button [2.1.5 - Multiple farms in KZN]
              SELECT FullName, COUNT(*) ✓ AS TotalFarms
              FROM tblFarmOwners, tblFarms ✓
              WHERE tblFarmOwners.OwnerID = tblFarms.OwnerID ✓
              AND ✓ (NearestTown = "Durban" OR NearestTown =
              "Pietermaritzburg") ✓                                               7
              GROUP BY FullName ✓
              HAVING COUNT(*) > 1 ✓

              Alternative:
              NearestTown IN ("Durban","Pietermaritzburg")

                                                                  Subtotal:      25

QUESTION 2: MARKING GRID (CONT.)

 2.2          Database Manipulation
              Button [2.2 - Mixed-farm type]

              Test IF file exists = False/try..except ✓
                Display a suitable message ✓
                Exit or else statement ✓
              AssignFile(tFile,'MixedFarms.txt') ✓
              Reset(tFile) ✓
              Loop through Text file ✓
                Readln(tFile, FarmID variable) ✓
                tblFarms.First ✓
                Loop through tblFarms ✓
                   Test IF FarmID variable = tblFarms['FarmID'] ✓
                                                                                 15
                      Test IF tblFarms['SizeInHectares'] > 100 ✓
                          tblFarms.Edit ✓
                          tblFarms['FarmType'] = ‘Mixed’ ✓
                          tblFarms.Post
                      Else
                           Display tblFarms['FarmID'] as string,
                           tblFarms['FarmName'] and
                           tblFarms['SizeInHectares'] as string in redQ2_2 ✓
                   tblFarms.Next ✓
                End loop (tblFarms)
              End loop (Text file)

                                                                  Subtotal:      15

                                                       TOTAL SECTION B:          40

Copyright reserved                                                             Please turn over

### Page 7

Information Technology/P1                     7                          DBE/November 2025
                                   NSC – Marking Guidelines

ANNEXURE C

QUESTION 3: MARKING GRID – OBJECT-ORIENTATED PROGRAMMING

 CENTRE NUMBER:                             EXAMINATION NUMBER:
                                                                              MAX.      LEARNER'S
QUESTION                            DESCRIPTION                              MARKS        MARKS
 3.1.1         Constructor method
              Constructor heading with String, Integer and Boolean
              parameters ✓
              Assign the three parameters to correct attributes ✓
                                                                                4
              Assign the following default values to the other attributes:
               fNoOfHarvests = 2               ✓
               fTotalHoneyHarvested = 80
               fHarvestDates = '2025/01/05' + #13 + '2025/06/23' ✓

 3.1.2         Function getNoOfHarvests
              Function heading getNoOfHarvests with integer return type ✓       2
              Return fNoOfHarvests ✓

 3.1.3         Function calcAverage
               Function heading calcAverage ✓ with real return type ✓
               Return ✓ fTotalHoneyHarvested/ fNoOfHarvests ✓                   4

               ALSO ACCEPT: fTotalHoneyHarvested/ getNoOfHarvests

 3.1.4         Procedure updateBeehiveDetails
               Procedure heading with a real parameter ✓
               fTotalHoneyHarvested = fTotalHoneyHarvested ✓ + parameter ✓      6
               fNoOfHarvests = fNoOfHarvests + 1 ✓
               fHarvestDates = fHarvestDates ✓ + #13 + system date ✓

Copyright reserved                                                           Please turn over

### Page 8

Information Technology/P1                     8                           DBE/November 2025
                                   NSC – Marking Guidelines

 3.1.5         Function checkHealthStatus

              Function heading with Boolean return type ✓
              Test IF ((fBeeCount > 7000) ✓ OR (fNoOfHarvests <=3)) ✓
                                        AND (fPests = False) ✓
                Result = True ✓
              Else
                Result = False ✓

              Alternative 1:
              Function heading with Boolean return type (1)                     6
              Result = False (1)
              Test IF (fBeeCount > 7000) (1) OR (fNoOfHarvests <=3) (1)
                 Test IF (fPests = False) (1)
                   Result = True (1)

              Alternative 2:
              Function heading with Boolean return type (1)
              Result = (2)
              ((fBeeCount > 7000) (1) OR (fNoOfHarvests <=3)) (1)
              AND (fPests = False) (1)

                                                    Subtotal: Object class     22

Copyright reserved                                                           Please turn over

### Page 9

Information Technology/P1                    9                          DBE/November 2025
                                  NSC – Marking Guidelines

QUESTION 3: MARKING GRID (CONT.)

                                                                            MAX.       LEARNER'
QUESTION                            DESCRIPTION                            MARKS       S MARKS
 3.2.1        Button [3.2.1 - Instantiate beehive object]

              objBeehive := ✓ TBeehive.Create() ✓
                                                                               5
                                   Extracted parameters in sequence ✓
              Display object in redQ3_2 ✓ using toString method ✓

 3.2.2        Button [3.2.2 - Ready to harvest?]

              Test IF objBeehive.checkHealthStatus = TRUE ✓
                Display 'Ready to harvest' on lblQ3_2_2
                btnQ3_2_3.Enabled = True
              Else ✓
                Display 'Not ready to harvest' on lblQ3_2_2 ✓ //both
                btnQ3_2_3.Enabled = False ✓ //both                             4

              Concepts:
              Test IF condition (1) with Else statement (1)
              Display message 'Ready to harvest'/ 'Not ready to harvest'
                     in lblQ3_2_2 (1)
              btnQ3_2_3.Enabled = True/False(1)

 3.2.3        Button [3.2.3 - Honey harvested]

              Extract Value from edtQ3_2_3 as real data type ✓
              Call objBeehive.updateBeehiveDetails (Value) ✓
                                                                               4
              Display in redQ3_2:
                Label + objBeehive.getNoOfHarvests as string ✓
                objBeehive.toString ✓

 3.2.4        Button [3.2.4 - Average honey harvested]

              Call objBeehive.calcAverage ✓ to display average                 3
                 using ShowMessage ✓ formatted to 2 decimal places ✓

 3.2.5        Button [3.2.5 - Change status of pests]

              Call objBeehive.setPests ✓                                       2
              Disable btnQ3_2_3 ✓

                                                    Subtotal Form class:      18

                                                     TOTAL SECTION C:         40

Copyright reserved                                                         Please turn over

### Page 10

Information Technology/P1                       10                            DBE/November 2025
                                      NSC – Marking Guidelines

ANNEXURE D

QUESTION 4: MARKING GRID – PROBLEM-SOLVING PROGRAMMING

 CENTRE NUMBER:                                 EXAMINATION NUMBER:
                                                                               MAX.     LEARNER'S
QUESTION                               DESCRIPTION
                                                                              MARKS       MARKS
 4.1.1       Button [4.1.1 - Extract]

             Loop Row from 1 to 10 ✓
               Loop Col from 1 to 2 ✓
                 Find position of placeholder ✓ in arrSoil[Row] ✓
                                                                                 8
                 Extract value as number ✓
                    and store in arr2DSoil[Row,Col] ✓
                 Delete from index 1 up to placeholder ✓
               Mechanism to deal with last value ✓

 4.1.2       Button [4.1.2 - Validate]

             Loop Row from 1 to 10 ✓
               Initialise Total to 0 ✓
               Loop Col from 1 to 3 ✓
                  Increment Total with value of arr2DSoil[Row,Col] ✓             9
               Test IF Total < 100 ✓
                  Loop A from 1 to 3 ✓
                      Calculate ratio arr2DSoil[Row, A] ✓ / Total *100 ✓
                     Display hectare with Row number as string in redQ4_1 ✓

Copyright reserved                                                              Please turn over

### Page 11

Information Technology/P1                            11                         DBE/November 2025
                                           NSC – Marking Guidelines

 4.2         Button [4.2 - Nutrient markers]

             Loop Loop1 from 1 to 50000 ✓
               Initialise Sum to 0 ✓
               Loop ✓ Loop2 from 1 to Length(Loop1) ✓ //number of digits
                  Initialise Factorial to 1 ✓
                  Loop ✓ Loop3 from 1 to
                        typecast integer (typecast string (Loop1)✓ [Loop2]) ✓
                        //value of digit
                     Factorial = Factorial * Loop3✓
                  Sum = Sum + Factorial ✓
                Test ✓ IF Sum = Loop1 ✓
                  Display Loop1/ Sum as string in memQ4_2 ✓
                                                                                   13
             Concepts:
             Outer Loop1 (1)
             Initialise Sum variable (1)
             Inner Loop2 - Nested loop2 (1) using length of the string of
             outer loop variable (1)
             Initialise Factorial variable (1)
             Digit extraction - Nested Loop3 (1), Digit extraction (1),
             Typecast to integer (1)
             Factorial calculation (1)
             Sum logic (1)
             Comparison logic - IF statement (1) Sum = outer loop1 (1)
             Output (1)

                                                            TOTAL SECTION D:       30
                                                               GRAND TOTAL:       150

Copyright reserved                                                                Please turn over

### Page 12

Information Technology/P1                 12                           DBE/November 2025
                                NSC – Marking Guidelines

SUMMARY OF LEARNER'S MARKS:

 CENTRE NUMBER:                 LEARNER'S EXAMINATION NUMBER:

                 SECTION A   SECTION B      SECTION C      SECTION D

                QUESTION 1   QUESTION 2     QUESTION 3     QUESTION 4       GRAND TOTAL

    MAX.
   MARKS
                     40          40              40            30                 150

 LEARNER'S
   MARKS

Copyright reserved                                                       Please turn over

### Page 13

Information Technology/P1               13                DBE/November 2025
                              NSC – Marking Guidelines

ANNEXURE E: SOLUTION FOR QUESTION 1

unit Question1_U;

interface

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

type
    gpbQ1_1: TGroupBox;
    pnlQ1_1: TPanel;
    btnQ1_1: TButton;
    gpbQ1_2: TGroupBox;
    lblLength: TLabel;
    spnQ1_2: TSpinEdit;
    imgIcosahedron: TImage;
    edtQ1_2: TEdit;
    btnQ1_2: TButton;
    gpbQ1_3: TGroupBox;
    lblDate: TLabel;
    edtQ1_3: TEdit;
    lblQ1_3: TLabel;
    gpbQ1_4: TGroupBox;
    memQ1_4: TMemo;
    btnQ1_4: TButton;
    lblVolume: TLabel;
    btnQ1_3: TButton;
    GroupBox1: TGroupBox;
    edtQ1_5_Num1: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    edtQ1_5_Num2: TEdit;
    btnQ1_5: TButton;
    edtQ1_5: TEdit;
    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}

Copyright reserved                                          Please turn over

### Page 14

Information Technology/P1             14                  DBE/November 2025
                            NSC – Marking Guidelines

// =====================================================================
// Question 1.1          4 marks
// =====================================================================
procedure TfrmQuestion1.btnQ1_1Click(Sender: TObject);
var
  iNum: Integer;
begin

// Question 1.1
  iNum := StrToInt(pnlQ1_1.Caption);
  Inc(iNum);
  pnlQ1_1.Caption := IntToStr(iNum);
end;

// =====================================================================
// Question 1.2         6 marks
// =====================================================================
procedure TfrmQuestion1.btnQ1_2Click(Sender: TObject);
var
  iSide: Integer;
  rVolume: Real;
begin
// Question 1.2
  iSide := spnQ1_2.Value;
  rVolume := 5 * (3 + Sqrt(5)) / 12 * Power(iSide,3);
  edtQ1_2.Text := FloatToStrF(rVolume, ffFixed, 8, 2);
end;

// =====================================================================
// Question 1.3          11 marks
// =====================================================================
procedure TfrmQuestion1.btnQ1_3Click(Sender: TObject);
var
  sCode, sOutput: string;
  sAisle: string;
  cCategory : Char;
  iPos : Integer;
begin
// Question 1.3
  sCode := edtQ1_3.Text;
  iPos := Pos('#', sCode);
  cCategory := sCode[iPos+1];
  sAisle := Copy(sCode, 1, iPos-1);
  case cCategory of
     'F': sOutput := 'Fruit and vegetables';
     'D': sOutput := 'Dairy';
     'B': sOutput := 'Butchery';
     'S': sOutput := 'Sauces';
     'P': sOutput := 'Pasta and Rice';
  end;
  sOutput := 'Aisle ' + sAisle + ': ' + sOutput;
  lblQ1_3.Caption := sOutput;
end;

Copyright reserved                                          Please turn over

### Page 15

Information Technology/P1              15                 DBE/November 2025
                             NSC – Marking Guidelines

// =====================================================================
// Question 1.4   8 marks
// =====================================================================
procedure TfrmQuestion1.btnQ1_4Click(Sender: TObject);
//Provided code
var
  arrNumbers: array [1 .. 9] of Integer;
//End of provided code

  iCnt: Integer;
  sOut: String;
begin
// Question 1.4

  sOut := '';
  for iCnt := 1 to length(arrNumbers) do
  begin
     arrNumbers[iCnt] := RandomRange(1, 16);
     sOut := sOut + '-' + IntToStr(arrNumbers[iCnt]);
  end;
  Delete(sOut, length(sOut), 1);
  memQ1_4.Text := sOut;
end;

// =====================================================================
// Question 1.5       11 marks
// =====================================================================
procedure TfrmQuestion1.btnQ1_5Click(Sender: TObject);
var
  iCnt: Integer;
  iHCF, iLowerNum, iNum1, iNum2: Integer;
begin
//Provided code
  iNum1 := StrToInt(edtQ1_5_Num1.Text);
  iNum2 := StrToInt(edtQ1_5_Num2.Text);
  iHCF := 0;

// Question 1.5
// Code using a while loop
if iNum1 < iNum2 then
    iLowerNum := iNum1
  else
    iLowerNum := iNum2;

// Code using a while loop
  iCnt := 1;
  While iCnt <= iLowerNum do
  begin
    if (iNum1 MOD iCnt = 0) then
      if (iNum2 MOD iCnt = 0) then
        iHCF := iCnt;
    Inc(iCnt);
  end;

Copyright reserved                                          Please turn over

### Page 16

Information Technology/P1             16               DBE/November 2025
                            NSC – Marking Guidelines

Code using a Repeat Until loop
 { iCnt : = 1;
  Repeat
    if (iNum1 MOD iCnt = 0) then
      if (iNum2 MOD iCnt = 0) then
        iHCF := iCnt;
    Inc(iCnt);
 Until iCnt > iLowerNum;
  end;}

//Code using a For loop
  {for iCnt := 1 to iLowerNum do
  begin
    if (iNum1 MOD iCnt = 0) then
      if (iNum2 MOD iCnt = 0) then
      begin
        iHCF := iCnt;
      end;
  end;}

  edtQ1_5.Text := 'HCF: ' + IntToStr(iHCF);

end;
end.

Copyright reserved                                       Please turn over

### Page 17

Information Technology/P1             17                  DBE/November 2025
                            NSC – Marking Guidelines

ANNEXURE F: SOLUTION FOR QUESTION 2

//======================================================================
// Question 2.1 – Section: SQL statements
//======================================================================

//======================================================================
// Question 2.1.1          3 marks
//======================================================================
procedure TfrmQuestion2.btnQ2_1_1Click(Sender: TObject);
var
  sSQL1: string;
begin
  // Question 2.1.1

  sSQL1 := 'SELECT FarmName, NearestTown, SizeInHectares FROM tblFarms ' +
    'ORDER BY SizeInHectares DESC';

  // Provided code - do not change
  dbCONN.runSQL(sSQL1);
end;

//======================================================================
// Question 2.1.2          2 marks
//======================================================================
procedure TfrmQuestion2.btnQ2_1_2Click(Sender: TObject);
var
  sSQL2: string;
begin
  // Question 2.1.2

  sSQL2 := 'SELECT FullName, ContactNumber ' +
    'FROM tblFarmOwners WHERE Email IS NULL';

  // Provided code - do not change
  dbCONN.runSQL(sSQL2);
end;

//======================================================================
// Question 2.1.3           6 marks
//======================================================================
procedure TfrmQuestion2.btnQ2_1_3Click(Sender: TObject);
var
  sSQL3, sFarmType: string;
begin
  // Provided code
  sFarmType := cmbQ2_1_3.Text;

  // Question 2.1.3
  sSQL3 :=
    'SELECT FarmType, FORMAT(AVG(SizeInHectares),"0.00") as AverageSize ' +
    'FROM tblFarms ' + 'WHERE FarmType = "' + sFarmType + '" GROUP BY
     FarmType';

  // Provided code - do not change
  dbCONN.runSQL(sSQL3);
end;
Copyright reserved                                          Please turn over

### Page 18

Information Technology/P1             18                  DBE/November 2025
                            NSC – Marking Guidelines

//======================================================================
// Question 2.1.4          7 marks
//======================================================================
procedure TfrmQuestion2.btnQ2_1_4Click(Sender: TObject);
var
  sSQL4: string;
begin
  //Question 2.1.4

  sSQL4 :=  'SELECT FullName, DateOfBirth, INT((NOW - DateOfBirth)/365)
                 AS Age ' +
            'FROM tblFarmOwners ' +
            'WHERE INT((NOW - DateOfBirth)/365) <= 25 ';
  // Alternative
   sSQL4:= 'SELECT FullName, INT((NOW - DateOfBirth)/365) AS Age
    ' +
    ' FROM tblFarmOwners' +
    ' WHERE INT((NOW - DateOfBirth)/365) <= 25 ';

  // Provided code - do not change
  dbCONN.runSQL(sSQL4)

end;

//======================================================================
// Question 2.1.5          7 marks
//======================================================================
procedure TfrmQuestion2.btnQ2_1_5Click(Sender: TObject);
var
  sSQL5: string;
begin
  // Question 2.1.5
  sSQL5 := 'SELECT FullName, COUNT(*) AS TotalFarms ' +
            'FROM tblFarmOwners, tblFarms ' +
            'WHERE tblFarmOwners.OwnerID = tblFarms.OwnerID AND
            (NearestTown = "Durban" OR NearestTown = "Pietermaritzburg")' +
            'GROUP BY FullName ' +
            'HAVING COUNT(*) > 1 ';

  // Provided code - do not change
  dbCONN.runSQL(sSQL5);

Copyright reserved                                          Please turn over

### Page 19

Information Technology/P1             19                  DBE/November 2025
                            NSC – Marking Guidelines

//======================================================================
// Question 2.2 – Section Delphi code
//======================================================================

//======================================================================
// Question 2.2            15 marks
// =====================================================================

procedure TfrmQuestion2.btnQ2_2Click(Sender: TObject);
var
  tFile: TextFile;
  iFarmID: Integer;
  sFarmType: string;
begin
  // Provided code - do not change
  redQ2_2.Clear;
  redQ2_2.Lines.Add('Farms on list that do not qualify: ');

  // Question 2.2
  Assignfile(tFile, 'MixedFarms.txt');
  try
    Reset(tFile);
  except
    ShowMessage('File does not exist');
    Exit;
  end;

  while not Eof(tFile) do
  begin
    Readln(tFile, iFarmID);
    tblFarms.First;
    while not tblFarms.Eof do
    begin
      if (tblFarms['FarmID'] = iFarmID) then
      begin
        if tblFarms['SizeInHectares'] > 100 then
        begin
          tblFarms.Edit;
          tblFarms['FarmType'] := 'Mixed';
          tblFarms.Post;
        end
        else
          redQ2_2.Lines.Add(IntToStr(tblFarms['FarmID']) + ' - ' + tblFarms
              ['FarmName'] + ' - ' + IntToStr(tblFarms['SizeInHectares'])+
                                      ' hectares');
      end;
      tblFarms.Next;
    end;
  end;

  // Provided code
  tblFarms.Sort := 'FarmID ASC';
end;

Copyright reserved                                            Please turn over

### Page 20

Information Technology/P1             20                  DBE/November 2025
                            NSC – Marking Guidelines

ANNEXURE G: SOLUTION FOR QUESTION 3

Object class

unit Beehive_U;

interface

Uses SysUtils, DateUtils, Math;

Type
  TBeehive = class(TObject)
  Private
     fBeehiveID: String;
     fBeeCount: Integer;
     fPests: Boolean;
     fNoOfHarvests: Integer;
     fTotalHoneyHarvested: Real;
     fHarvestDates: String;

  Public
    Constructor Create(sBeehiveID: String; iBeeCount: Integer;
                            bPests : boolean);
    Function getNoOfHarvests: Integer;
    Function calcAverage: Real;
    Procedure updateBeehiveDetails(rHoneyKG: Real);
    Function checkHealthStatus: Boolean;

    // Provided code
    Procedure setPests;
    Function toString: String;
  End;
implementation

{ TBeehive }
// =====================================================================
// Question 3.1.1          4 marks
// =====================================================================
Constructor TBeehive.Create(sBeehiveID: String; iBeeCount: Integer; bPests
: boolean);
begin
  fBeehiveID := sBeehiveID;
  fBeeCount := iBeeCount;
  fPests := bPests;
  fNoOfHarvests := 2;
  fTotalHoneyHarvested := 80;
  fHarvestDates := '2025/01/05' + #13 + '2025/06/23';
end;
// =====================================================================
// Question 3.1.2          2 marks
// =====================================================================
function TBeehive.getNoOfHarvests: Integer;
begin
  Result := fNoOfHarvests;
end;

Copyright reserved                                          Please turn over

### Page 21

Information Technology/P1             21                  DBE/November 2025
                            NSC – Marking Guidelines

// =====================================================================
// Question 3.1.3          4 marks
// =====================================================================
function TBeehive.calcAverage: Real;
begin
  Result := fTotalHoneyHarvested / fNoOfHarvests;
end;
// =====================================================================
// Question 3.1.4          6 marks
// =====================================================================
procedure TBeehive.updateBeehiveDetails(rHoneyKG: Real);
begin
  fTotalHoneyHarvested := fTotalHoneyHarvested + rHoneyKG;
  Inc(fNoOfHarvests);
  fHarvestDates := fHarvestDates + #13 + DateToStr(Date);
end;
// =====================================================================
// Question 3.1.5          6 marks
// =====================================================================
   function TBeehive.checkHealthStatus: Boolean;
   var
       bHealthy : Boolean;
   begin
     bHealthy := False;
     if (fPests = False) AND ((fBeeCount > 7000) OR
                                    (fNoOfHarvests <= 3)) then
        bHealthy := True;
     Result := bHealthy;
   //Alternative
     Result:= (fPests = False) AND ((fBeeCount > 7000) OR
                                    (fNoOfHarvests <= 3))
   end;
// =====================================================================
// Provided methods
// =====================================================================
   procedure TBeehive.setPest;
   begin
     if fPests = True then
       fPests := False
     else
       fPests := True;
   end;
   function TBeehive.toString: String;
   var
     sPestStatus: String;
   begin
     if fPestStatus then
       sPestStatus :='Pests in beehive.'
     else
       sPestStatus := 'No pests in beehive.';
     Result := 'Beehive ID: ' + #9 + fBeehiveID + #13 +
               'Number of bees in beehive: ' +#9 + IntToStr(fBeeCount)+#13+
               'Honey harvested in kg: ' + #9 +
                FloatToStrF(fTotalHoneyHarvested, ffFixed, 8, 1)+#13+
               'Number of harvests:'+ #9+ IntToStr(fNoOfHarvests)+#13#13+
               'Harvest dates: ' + #13 + fHarvestDates + #13 + sPestStatus;
   end;
   end.
Copyright reserved                                           Please turn over

### Page 22

Information Technology/P1             22                  DBE/November 2025
                            NSC – Marking Guidelines

Main Form Unit

unit Question3_U;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls, pngimage, ExtCtrls, Spin, ComCtrls, Math,
beehive_u;

type
  TfrmQuestion3_2 = class(TForm)
     pnlQ3_2: TPanel;
     imgBeeLeft: TImage;
     gpbQ3_2_1: TGroupBox;
     cmbQ3: TComboBox;
     lblCode: TLabel;
     btnQ3_2_1: TButton;
     lblNumBees: TLabel;
     gpbQ3_2_3: TGroupBox;
     lblHavest: TLabel;
     imgBeeRight: TImage;
     gpbQ3_2_4: TGroupBox;
     btnQ3_2_4: TButton;
     redQ3_2: TRichEdit;
     btnQ3_2_3: TButton;
     spnQ3: TSpinEdit;
     edtQ3_2_3: TEdit;
     btnQ3_2_2: TButton;
     gpbQ3_2_2: TGroupBox;
     GroupBox1: TGroupBox;
     lblQ3_2_2: TLabel;
     GroupBox2: TGroupBox;
     GroupBox3: TGroupBox;
     btnQ3_2_5: TButton;
     Edit1: TEdit;
     chbQ3: TCheckBox;
     lblPests: TLabel;
     procedure btnQ3_2_1Click(Sender: TObject);
     procedure FormCreate(Sender: TObject);
     procedure btnQ3_2_3Click(Sender: TObject);
     procedure btnQ3_2_4Click(Sender: TObject);
     procedure btnQ3_2_2Click(Sender: TObject);
     procedure btnQ3_2_5Click(Sender: TObject);
     procedure chbQ3Click(Sender: TObject);
     procedure GroupBox2Click(Sender: TObject);
  private
     { Private declarations }
  public
     { Public declarations }
  end;
var
  frmQuestion3_2: TfrmQuestion3_2;
  // Provided code
  objBeehive: TBeehive;

implementation

Copyright reserved                                          Please turn over

### Page 23

Information Technology/P1               23                DBE/November 2025
                              NSC – Marking Guidelines

// =====================================================================
// Question 3.2.1         5 marks
// =====================================================================
procedure TfrmQuestion3_2.btnQ3_2_1Click(Sender: TObject);
var
  // Provided code
  sBeehiveID: string;
  iNumBees: Integer;
  bPests: Boolean;
begin

  // Provided code
  redQ3_2.Clear;
  sBeehiveID := cmbQ3.Text;
  iNumBees := spnQ3.Value;
  bPests := chbQ3.checked;

  // Question 3.2.1
  objBeehive := TBeehive.Create(sBeehiveID, iNumBees, bPests);
  redQ3_2.Lines.Add(objBeehive.toString);
end;;

// =====================================================================
// Question 3.2.2          4 marks
// =====================================================================
procedure TfrmQuestion3_2.btnQ3_2_2Click(Sender: TObject);
begin
  // Question 3.2.2
  if objBeehive.checkHealthStatus then
     lblQ3_2_2.Caption := 'Beehive is ready to harvest.'
  else
     lblQ3_2_2.Caption := 'Beehive is not ready to harvest.';
  btnQ3_2_3.Enabled := objBeehive.checkHealthStatus;
end;

// =====================================================================
// Question 3.2.3         4 marks
// =====================================================================
procedure TfrmQuestion3_2.btnQ3_2_3Click(Sender: TObject);
var
  rAmount: Real;
begin
  // Provided code
  redQ3_2.Clear;

  // Question 3.2.3
  rAmount := StrToFloat(edtQ3_2_3.Text);
  objBeehive.updateBeehiveDetails(rAmount);
  redQ3_2.Lines.Add('Harvest number:' +
           IntToStr(objBeehive.getNoOfHarvests));
  redQ3_2.Lines.Add(objBeehive.toString);
end;

Copyright reserved                                          Please turn over

### Page 24

Information Technology/P1             24                  DBE/November 2025
                            NSC – Marking Guidelines

// =====================================================================
// Question 3.2.4        3 marks
// =====================================================================
procedure TfrmQuestion3_2.btnQ3_2_4Click(Sender: TObject);
begin
  // Question 3.2.4
  ShowMessage('Average honey harvested = ' + FloatToStrF
      (objBeehive.calcAverage, ffFixed, 6, 2));
end;

// =====================================================================
// Question 3.2.5        2 marks
// =====================================================================
procedure TfrmQuestion3_2.btnQ3_2_5Click(Sender: TObject);
begin
  objBeehive.setPests;
  btnQ3_2_3.Enabled := false;
end;

// =====================================================================
// Provided code
// =====================================================================

{$REGION 'Provided code - DO NOT MODIFY'}

procedure TfrmQuestion3_2.FormCreate(Sender: TObject);
begin
  redQ3_2.clear;
  redQ3_2.Paragraph.tabcount := 1;
  redQ3_2.Paragraph.tab[0] := 150;

  btnQ3_2_3.Enabled := False;
end;
{$ENDREGION}

end.

Copyright reserved                                          Please turn over

### Page 25

Information Technology/P1             25                  DBE/November 2025
                            NSC – Marking Guidelines

ANNEXURE H: SOLUTION FOR QUESTION 4
unit Question4_U;

interface

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

type
  TfrmQuestion4 = class(TForm)
     gbxQ4_1: TGroupBox;
     gbxQ4_2: TGroupBox;
     btnQ4_1_1: TButton;
     btnQ4_1_2: TButton;
     btnQ4_2: TButton;
     memQ4_2: TMemo;
     redQ4_1: TRichEdit;
     procedure btnQ4_1_1Click(Sender: TObject);
     procedure btnQ4_1_2Click(Sender: TObject);
     procedure btnQ4_2Click(Sender: TObject);

  private
    { Private declarations }
  public
    procedure Display;
  end;

var
  frmQuestion4: TfrmQuestion4;
  // Provided code
  arrSoil: array [1 .. 10] of String = (
    '20:50:10',
    '40:30:30',
    '30:28:30',
    '60:20:20',
    '25:30:45',
    '50:40:10',
    '30:55:15',
    '45:35:20',
    '35:0:55',
    '55:25:20'
  );
  arr2DSoil: array [1 .. 10, 1 .. 3] of Real;

implementation

{$R *.dfm}

Copyright reserved                                          Please turn over

### Page 26

Information Technology/P1             26                   DBE/November 2025
                            NSC – Marking Guidelines

// =====================================================================
// Question 4.1.1         8 marks
// =====================================================================
procedure TfrmQuestion4.btnQ4_1_1Click(Sender: TObject);
var
  iRow, iCol, iPos: Integer;
begin
  // Question 4.1.1

  for iRow := 1 to 10 do
  begin
    for iCol := 1 to 2 do
    begin
      iPos := pos(':', arrSoil[iRow]);
      arr2DSoil[iRow, iCol] := StrToInt(copy(arrSoil[iRow], 1, iPos - 1));
      delete(arrSoil[iRow], 1, iPos);
    end;
    arr2DSoil[iRow, iCol] := StrToInt(arrSoil[iRow]);
  end;

  // Provided code
  redQ4_1.Clear;
  Display;
end;

// =====================================================================
// Question 4.1.2         9 marks
// =====================================================================
procedure TfrmQuestion4.btnQ4_1_2Click(Sender: TObject);
var
  iRow, iCol, A: Integer;
  rClay, rSand, rSilt, rSum: Real;
begin
  // Provided code
  redQ4_1.Clear;
  redQ4_1.lines.add('Hectares adjusted:');
// Question 4.1.2
  for iRow := 1 to 10 do
  begin
    rSum := 0;
    for iCol := 1 to 3 do
      rSum := rSum + arr2DSoil[iRow, iCol];

     if (rSum < 100) then
     begin
       for A := 1 to 3 do
         arr2DSoil[iRow, A] := (arr2DSoil[iRow, A] / rSum * 100);
       redQ4_1.Lines.Add('Hectare ' + IntToStr(iRow));
     end;
  end;
  // Provided code
  redQ4_1.Lines.Add(#13 + 'Updated data: ');
  redQ4_1.Lines.Add('=========================');
  Display;
end;

// =====================================================================
Copyright reserved                                           Please turn over

### Page 27

Information Technology/P1             27                   DBE/November 2025
                            NSC – Marking Guidelines
// Question 4.2          13 marks
// =====================================================================
procedure TfrmQuestion4.btnQ4_2Click(Sender: TObject);
var
  rTFactor, rTNum: Real;
  iValue: Integer;
  iLoop1, iLoop2, iLoop3: Integer;
begin
  // Provided code
  memQ4_2.Clear;
  memQ4_2.Lines.Add('Nutrient markers:');
  memQ4_2.Lines.Add('=================');

  // Question 4.2
  For iLoop1 := 1 to 50000 do
  begin
     rTNum := 0;
     For iLoop2 := 1 to Length(IntToStr(iLoop1)) do
     begin
       rTFactor := 1;
       For iLoop3 := 1 to StrToInt(IntToStr(iLoop1)[iLoop2]) do
         rTFactor := rTFactor * iLoop3;
       rTNum := rTNum + rTFactor;
     end;
     if rTNum = iLoop1 then
       memQ4_2.Lines.Add(IntToStr(iLoop1));
  end;
end;

//=====================================================================
// Display Method
// =====================================================================
// Provided code
procedure TfrmQuestion4.Display;
var
  iRow, iCol: Integer;
  sTotal: String;
begin
  redQ4_1.Lines.Add('Hectare' + #9 + 'Clay' + #9 + 'Sand' + #9 + 'Silt');
  For iRow := 1 to 10 do
  begin
     sTotal := IntToStr(iRow) + #9#9;
     For iCol := 1 to 2 do
       sTotal := sTotal + FloatToStrF(arr2DSoil[iRow, iCol],
                                       ffFixed, 8, 1) + #9;
     sTotal := sTotal + FloatToStrF(arr2DSoil[iRow, 3], ffFixed, 8, 1);
     redQ4_1.Lines.Add(sTotal);
  end;
end;

end.

Copyright reserved

## Related documents

- [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
- [Information Technology P1 Nov 2014 Memo Eng](https://www.hlayiso.com/library/information-technology-p1-nov-2014-memo-eng/5ce60bf6-fbc5-4741-8abb-86a179de07b7) — Information Technology · Memo · 2014 · Eng
- [Information Technology P1 Nov 2014 Memo Afr](https://www.hlayiso.com/library/information-technology-p1-nov-2014-memo-afr/f95a8905-970c-4975-bcc9-bb42cd12abbc) — Information Technology · Memo · 2014 · 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 MG Eng](https://www.hlayiso.com/library/information-technology-p1-may-june-2023-mg-eng/f868554b-8f4f-4370-aa4e-cfa745fc806d) — 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.
