# Information Technology Grade 12 P1 2012 Memo (Eng)

> Grade 12 Information Technology Paper 1 memorandum from the Eastern Cape Mock Exam 2012 (English), 11 pages. Read online or download the free PDF.

- Page: https://www.hlayiso.com/library/inft-p1-memo-eng-sep-2012/2b2c6fbe-6f79-4e2d-8b76-99366facbcce
- Updated: 2026-09-27
- Subject: Information Technology
- Grade: Grade 12
- Document type: Memorandum
- Year: 2012
- Exam period: Eastern Cape Mock Exam
- Paper: 1
- Curriculum: CAPS
- Pages: 11

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 2012 Memo (Eng)](https://www.hlayiso.com/library/inft-p1-memo-eng-sep-2012/2b2c6fbe-6f79-4e2d-8b76-99366facbcce)

## About this document

Information Technology · Grade 12 · Eastern Cape Mock Exam · 2012. Memorandum, 11 pages. Read online or download the PDF.

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

## Document text

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

### Page 1

Downloaded from hlayiso.com

                  Province of the
                  EASTERN CAPE
                  EDUCATION

                           NATIONAL
                      SENIOR CERTIFICATE

                            GRADE 12

                      SEPTEMBER 2012

          INFORMATION TECHNOLOGY P1
                MEMORANDUM

MARKS:   120

                   This memorandum consists of 11 pages.

### Page 2

Downloaded from hlayiso.com
2                              INFORMATION TECHNOLOGY P1                             (SEPTEMBER 2012)

SECTION A:

QUESTION 1                                                                   (30 marks)

(LO 4 AS 11, 12)

procedure TForm1.Button1Click(Sender: TObject);
begin
 qrySchool.active := false;
 qrySchool.SQL.Text := 'Select * from EducatorsTb order by Surname';
 qrySchool.Active := true;
 SetGridColumnWidths(DBGrid1);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
 qrySchool.active := false;
 qrySchool.SQL.Text := 'Select Title, Surname, TeacherCode from EducatorsTb where
(subjects = "ENG" or subjects = "AFR" or subjects = "XHO") ';
 qrySchool.Active := true;                                     OR where (subjects IN
[“ENG”,”AFR”,”XHO”)
 SetGridColumnWidths(DBGrid1);
end;

procedure TForm1.Button3Click(Sender: TObject);
var
 ssubject : string;
begin
 ssubject := inputbox('Enter Subject','',''); 
 qrySchool.active := false;
 qrySchool.SQL.Text := 'Select count(*)as [Potential Subject Numbers]  from LearnersTb
where (S5 = "'+ssubject+'")'; 
 qrySchool.Active := true;
 SetGridColumnWidths(DBGrid1);
end;

procedure TForm1.Button5Click(Sender: TObject);
begin
 qrySchool.active := false;
 qrySchool.SQL.Text := 'Select Name, Surname from LearnersTb where Teachers like
"%AM%"'; 
 qrySchool.Active := true;
 SetGridColumnWidths(DBGrid1);
end;

procedure TForm1.Button7Click(Sender: TObject);
begin
 qrySchool.active := false;
 qrySchool.SQL.Text := 'Update LearnersTb Set S5 = "LSC" where S5 = "ART"'; 
 qrySchool.Active := true;
 qrySchool.SQL.Text := 'Select * from LearnersTb'; 
 SetGridColumnWidths(DBGrid1);
end;

### Page 3

Downloaded from hlayiso.com
(SEPTEMBER 2012)                  INFORMATION TECHNOLOGY P1 (Memo)                                3

 procedure TForm1.Button8Click(Sender: TObject);
 begin
  qrySchool.active := false;
  qrySchool.SQL.Text := 'Select class, count(class)  AS [Class Sizes]  from LearnersTb group
 by Class';
  qrySchool.Active := true;
  SetGridColumnWidths(DBGrid1);
 end;

 procedure TForm1.Button9Click(Sender: TObject);
 begin
  qrySchool.active := false;
  qrySchool.SQL.Text := 'Select * from LearnersTb where (S7 = "CONS" or S7 = "TOUR")
 and (class = "G")';
  qrySchool.Active := true;
  SetGridColumnWidths(DBGrid1);
 end;

### Page 4

Downloaded from hlayiso.com
4                            INFORMATION TECHNOLOGY P1                        (SEPTEMBER 2012)

QUESTION 2                                                                (55 marks)
2.1 (LO4 AS4)
    2.1.1   Define a class                                                                 (1)
            Private                                                                        (1)
            Declaring fname, feng, fmaths, faverage                                        (2)
    2.1.2   Constructor heading                                                            (1)
            Assigning values to fields                                                     (3)
            Initialising faverage                                                          (1)
    2.1.3   Procedure CalcAverage heading                                                  (1)
            calculation                                                                    (2)
    2.1.4   Function Qualify – Boolean                                                     (1)
            If average >= 60                                                               (1)
            Qualify true else qualify false                                                (2)
    2.1.5   Function tostring heading                                                      (1)
            Putting fields together                                                        (1)
            #9 for columns                                                                 (1)
    2.1.6   GetName heading                                                                (1)
            fname assigned to result/function                                              (1)
    2.1.7   GetAverage heading                                                             (1)
            faverage assigned to result/function                                           (1)

2.2 2.2.1   Initialise counter                                                             (1)
            Check if file exists                                                           (1)
            Assignfile                                                                     (1)
            Reset                                                                          (1)
            While not eof() do                                                             (1)
            Readln                                                                         (1)
            Increase counter                                                               (1)
            Get name                                                                       (1)
            Get eng mark                                                                   (1)
            Get maths mark                                                                 (1)
            Assign to arrlearner                                                           (2)
    2.2.2   Loop                                                                           (1)
            Call CalcAverage                                                               (1)
            Call getname and getaverage  display                                          (2)
    2.2.3   Loop                                                                           (1)
            Call CalcAverage                                                               (1)
            Call qualify                                                                   (1)
            If qualify = true display tostring                                             (1)
    2.2.4   Inputbox                                                                       (1)
            Set flag variable to false                                                     (1)
            Loop (counter less than number of learners and flag variable false)            (2)
            If getname = input from inputbox                                               (2)
            Then flag variable = true                                                      (1)
            Else flag variable = false                                                     (1)
            Increase counter                                                               (1)
            If flag variable = true then display that name was found                       (2)
                                                                                          [32]

### Page 5

Downloaded from hlayiso.com
(SEPTEMBER 2012)                    INFORMATION TECHNOLOGY P1 (Memo)      5

 POSSIBLE SOLUTION
 unit Subjects_u;
 interface
 uses
  SysUtils;

 type
  TLearner = class
   private
   fname : string;
   feng : integer;
   fmaths : integer;
   faverage : real;
   public
   constructor create (sname : string; ieng, imaths : integer);
   procedure CalcAverage;
   function tostring : string;
   function getname : string;
   function getaverage : real;
   function qualify : boolean;
  end;
 implementation
 constructor TLearner.create (sname : string; ieng, imaths : integer);
 begin
   fname := sname;
   feng := ieng;
   fmaths := imaths;
   faverage := 0;
 end;
 procedure TLearner.CalcAverage;
 begin
  faverage := (feng + fmaths)/2;
 end;
 function Tlearner.tostring : string;
 begin
   result := fname + #9 + inttostr(feng) + #9 + inttostr(fmaths) + #9 +
 floattostrf(faverage,fffixed,3,1);
 end;
 function TLearner.getname : string;
 begin
  result := fname;
 end;
 function TLearner.getaverage : real;
 begin
  result := faverage;
 end;
 function TLearner.qualify : boolean;
 begin
   if faverage >= 60 then

### Page 6

Downloaded from hlayiso.com
6                                 INFORMATION TECHNOLOGY P1                   (SEPTEMBER 2012)

  qualify := true
 else
  qualify := false;
end;
end.
unit Question2_u;
interface
uses
 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 Dialogs, Menus, StdCtrls, ComCtrls, Subjects_u;
type
 TForm1 = class(TForm)
  MainMenu1: TMainMenu;
  RichEdit1: TRichEdit;
  Options1: TMenuItem;
  Average1: TMenuItem;
  ITPhysicalScienceMaths1: TMenuItem;
  SearchforaLearner1: TMenuItem;
  Exit1: TMenuItem;
  procedure FormActivate(Sender: TObject);
  procedure Average1Click(Sender: TObject);
  procedure ITPhysicalScienceMaths1Click(Sender: TObject);
  procedure SearchforaLearner1Click(Sender: TObject);
 private
  { Private declarations }
 public
  { Public declarations }
 end;
var
 Form1: TForm1;
 icount : integer;
 arrLearners : array[1..50] of TLearner;
implementation
{$R *.dfm}
procedure TForm1.FormActivate(Sender: TObject);
var
 myfile : textfile;
 soneline : string;
 ipos, ieng, imaths : integer;
 sname : string;
begin
 if fileexists('Learner.txt') <> true then
   begin
    ShowMessage('File does not exist');
    Exit;
   end;
 Assignfile(myfile, 'Learner.txt');
 Reset(myfile);

### Page 7

Downloaded from hlayiso.com
(SEPTEMBER 2012)                   INFORMATION TECHNOLOGY P1 (Memo)                  7

  icount := 0;
  while not eof(myfile) do
    begin
     readln(myfile,soneline);
     inc(icount);
     ipos := pos(',',soneline);
     sname := copy(soneline, 1, ipos - 1);
     delete(soneline, 1, ipos);
     ipos := pos(',',soneline);
     ieng := strtoint(copy(soneline, 1, ipos - 1));
     delete(soneline, 1, ipos);
     imaths := strtoint(soneline);
     arrLearners[icount] := TLearner.create(sname, ieng, imaths);
    end;
  closefile(myfile);
 end;
 procedure TForm1.Average1Click(Sender: TObject);
 var
   k : integer;
 begin
   richedit1.lines.add('Name' + #9 + #9 + 'Average');
   for k := 1 to icount do
    begin
    arrLearners[k].CalcAverage;
    richedit1.Lines.add(arrLearners[k].getname + #9 +
 floattostrf(arrLearners[k].getaverage,fffixed,6,0));
    end;
 procedure TForm1.ITPhysicalScienceMaths1Click(Sender: TObject);
 var
  k : integer;
 begin
  richedit1.lines.add('Name' + #9 +#9+ 'English' + #9 + 'Maths' + #9 + 'Average');
  for k := 1 to icount do
   begin
     arrLearners[k].CalcAverage;
     if arrlearners[k].qualify then
       richedit1.Lines.Add(arrlearners[k].tostring);
   end;
 procedure TForm1.SearchforaLearner1Click(Sender: TObject);
 var
  sinput : string;
  k : integer;
  bfound : boolean;
 begin
  sinput := inputbox('Enter Name','','');
  bfound := false;
  k := 1;
  while (k <= icount) and (bfound = false) do
   begin
     if arrLearners[k].getname = sinput then
       bfound := true
      else

### Page 8

Downloaded from hlayiso.com
8                                 INFORMATION TECHNOLOGY P1   (SEPTEMBER 2012)

       bfound := false;
      inc(k);
    end;
    if bfound = true then
      ShowMessage(sinput + ' found.');
    if bfound = false then
      ShowMessage(sinput + ' not found.');
end;

### Page 9

Downloaded from hlayiso.com
(SEPTEMBER 2012)              INFORMATION TECHNOLOGY P1 (Memo)                         9

 QUESTION 3                                                             (35 marks)

 3.1    For loop – columns                                                            (1)
        For loop – rows                                                               (1)
        Assign random values (100 – 600) to stringgrid                                (2)
        Assign column headings – using a for loop (2), alternative method (1)         (2)
        Assign row headings – using a for loop (2), alternative method (1)            (2)

 3.2    Procedure Calculate Totals                                                    (1)
        Heading for row in stringgrid                                                 (1)
        For loop – column                                                             (1)
        Initialise total variable                                                     (1)
        For loop – row                                                                (1)
        Calculate total of all values in each column                                  (1)

 3.3    Procedure CalculateAvgWeek                                                    (1)
        Heading for row in stringgrid                                                 (1)
        For loop                                                                      (1)
        Initialise total variable                                                     (1)
        Add all values in columns (for each class)                                    (2)
        Divide totals by 7                                                            (2)
        Display the average formatted to 2 decimals in the stringgrid                 (1)

 3.4    CalculateTotals call statement                                                (1)
        CalculateAvgWeek call statement                                               (1)

 3.5    Initialise high variable to 0                                                 (1)
        For loop – row                                                                (1)
        Initialise sum variable                                                       (1)
        For loop – column                                                             (1)
        Add values for each class                                                     (1)
        If sum is higher than high                                                    (1)
        Assign sum’s value to high                                                    (1)
        Assign the row value to a variable                                            (1)
        Display message of winning class                                              (1)
                                                                                     [35]

### Page 10

Downloaded from hlayiso.com
10                                  INFORMATION TECHNOLOGY P1                 (SEPTEMBER 2012)

POSSIBLE SOLUTION
unit question3_u;

interface

uses
 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 Dialogs, StdCtrls, Grids;

type
 TForm1 = class(TForm)
  StringGrid1: TStringGrid;
  Button1: TButton;
  Button2: TButton;
  procedure FormCreate(Sender: TObject);
  procedure Button1Click(Sender: TObject);
  procedure Button2Click(Sender: TObject);
 private
  { Private declarations }
 publi
  procedure CalculateTotals;
  procedure CalculateAvgWeek;
 end;
var
 Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
 irow, icol : integer;
begin
 randomize;
 for icol := 1 to 4 do
   for irow := 1 to 7 do
    stringgrid1.Cells[icol,irow] := inttostr(random(500)+101);
 for icol := 1 to 4 do
  stringgrid1.Cells[icol,0] := 'Week '+inttostr(icol);
 for irow := 1 to 7 do
  stringgrid1.cells[0,irow] := 'Class '+inttostr(irow);
end;
procedure TForm1.CalculateTotals;
var
 icol,irow, itotal : integer;
begin
 stringgrid1.cells[0,8] := 'Totals';
 for icol := 1 to 4 do
   begin
   itotal := 0;

### Page 11

Downloaded from hlayiso.com
(SEPTEMBER 2012)                       INFORMATION TECHNOLOGY P1 (Memo)   11

    for irow := 1 to 7 do
     begin
       itotal := itotal + strtoint(stringgrid1.cells[icol,irow]);
     end;
    stringgrid1.Cells[icol,irow] := inttostr(itotal)
   end;
 end;
 procedure TForm1.CalculateAvgWeek;
 var
  irow, icol : integer;
  rtotal, raverage : real;
 begin
  stringgrid1.cells[0,9] := 'Average';
  for icol := 1 to 4 do
    begin
     rtotal := rtotal + strtofloat(stringgrid1.cells[icol,8]);
     raverage := rtotal/7;
     stringgrid1.cells[icol,9] := floattostrf(raverage,fffixed,6,2);
     rtotal := 0;
    end;
 end;
 procedure TForm1.Button1Click(Sender: TObject);
 begin
  CalculateTotals;
  CalculateAvgWeek;
 end;
 procedure TForm1.Button2Click(Sender: TObject);
 var
  irow, ihigh, iclass, icol, isum,k,l,itemp : integer;
  arrclass : array[1..7] of integer;
 begin
  ihigh := 0;
  for irow := 1 to 7 do
    begin
     isum := 0;
     for icol := 1 to 4 do
       begin
       isum := isum + strtoint(stringgrid1.cells[icol,irow]);
       end;
       if isum > ihigh then
        begin
         ihigh := isum;
         iclass := irow;
        end;
    end;
  ShowMessage('Winning class: '+inttostr(iclass));
 end;
 end.

## Related documents

- [Information Technology P1 Nov 2013 Memo Afr](https://www.hlayiso.com/library/information-technology-p1-nov-2013-memo-afr/bd55bd18-73dc-48e8-9988-f6594e50cee0) — Information Technology · Memo · 2012 · Afr
- [Information Technology P1 Nov 2013 Memo Eng](https://www.hlayiso.com/library/information-technology-p1-nov-2013-memo-eng/56ada5ed-d687-4bba-ab5b-3af1486b3ab5) — Information Technology · Memo · 2012 · Eng
- [IT P1 GR12 MEMO SEPT 2022 Afrikaans](https://www.hlayiso.com/library/it-p1-gr12-memo-sept-2022-afrikaans/43cd69be-f0ac-46f4-9d4c-b2503fe09125) — Information Technology · Memo · 2022 · Afr
- [IT P1 GR12 MEMO SEPT 2022 English](https://www.hlayiso.com/library/it-p1-gr12-memo-sept-2022-english/6e7cbe6a-69aa-4c7d-bcd4-dcfeaf4c8272) — Information Technology · Memo · 2022 · Eng
- [INFO TECH P1 GR12 MEMO SEPT2021 ENG D](https://www.hlayiso.com/library/info-tech-p1-gr12-memo-sept2021-eng-d/ff05fb64-9f3d-4fe4-bb3d-3fe016928d51) — Information Technology · Memo · 2021 · Eng
- [IT P1 GR12 MEMO SEPT 2019 English](https://www.hlayiso.com/library/it-p1-gr12-memo-sept-2019-english/e1bbda31-02cd-4390-8960-747e62fdb1ee) — Information Technology · Memo · 2019 · Eng

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