# Information Technology Grade 12 P1 2023 Memo (Eng)

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

- Page: https://www.hlayiso.com/library/it-p1-memo-gr12-sept2023-english/94e1b342-5a35-4f84-aec8-3c0fd03e5005
- Updated: 2026-09-27
- Subject: Information Technology
- Grade: Grade 12
- Language: English
- Document type: Memorandum
- Year: 2023
- Exam period: Eastern Cape Mock Exam
- Paper: 1
- Curriculum: CAPS
- Pages: 20

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 2023 Memo (Eng)](https://www.hlayiso.com/library/it-p1-memo-gr12-sept2023-english/94e1b342-5a35-4f84-aec8-3c0fd03e5005)

## About this document

Information Technology · Grade 12 · Eastern Cape Mock Exam · 2023 · English. Memorandum, 20 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

                          GRADE 12

                       SEPTEMBER 2023

               INFORMATION TECHNOLOGY P1
                   MARKING GUIDELINE

MARKS:   150

                 This marking guideline consists of 20 pages.

### Page 2

2                             INFORMATION TECHNOLOGY P1                    (EC/SEPTEMBER 2023)

NAME OF LEARNER:

  TOTAL                TOTAL             TOTAL                 TOTAL
                                                                                         TOTAL
QUESTION 1           QUESTION 2        QUESTION 3            QUESTION 4

            /40                /35                 /35                    /40               /150
                                                                                    MAX     MARKS
                            QUESTION 1                                              MARK   ACHIEVED
1.1     BUTTON: [Q1.1 – Determine Cost]

        Using an if / case statement ✓
                                                                                     4
        Determine the license type from the radio group ✓
        Display the license type ✓ as well as the cost of the license in the
        Cost label component ✓

1.2.1   BUTTON: [Q1.2.1 – Add the front wheel]

        Create the dynamic shape: shpFrontWheel ✓
        Set parent of shpFrontWheel to the panel pnlQ1_2_Lights ✓

        Change the properties of shpFrontWheel:
                                                                                     6
             Type → Circle ✓
             Top → 25 ✓
             Left → 35
             Width → 50 ✓
             Height → 50
             Colour → White ✓

1.2.2   BUTTON: [Q1.2.2 – Raise landing gear]
                                                                                     1
        Change the colour of all three shapes to Red ✓

1.2.3   BUTTON: [Q1.2.3 – Lower landing gear]
                                                                                     1
        Change the colour of all three shapes to Green ✓

1.2.4   BUTTON: [Q1.2.4 – Test landing gear]

        Using either case or if statement, determine the state of the lights
        and produce the correct Message DLG
                                                                                     8
        If all 3 lights = Red ✓ → MessageDLG ✓ (‘Catastrophic failure’) ✓
        Else ✓
           If all 3 lights = Green ✓ → MessageDLG(‘Safe to land’) ✓
        Else ✓
           MessageDLG(‘Caution, not safe to land’) ✓

Copyright reserved                                                             Please turn over

### Page 3

(EC/SEPTEMBER 2023)              INFORMATION TECHNOLOGY P1                                3

1.3     BUTTON: [Q1.3 – Top of Descent]

        Vertical Speed
         Get StartSpeed
         Get EndSpeed            ✓
         Get Wind
         GetGlideSlope

          AverageSpeed = (StartSpeed + EndSpeed) / 2 + Wind ✓✓
          VerticalSpeed_NM_P_Min = (tan(GlideSlope * DEG_TO_RAD) *
                                         AverageSpeed) / 60 ✓✓
          VerticalSpeed := VerticalSpeed_NM_P_Min * NM_TO_FT ✓

        Distance
         Get StartAltitude   ✓
         Get EndAltitude
                                                                            20
          DeltaAltitude = StartAltitude – EndAltitude ✓
          Distance = (DeltaAltitude * FT_TO_NM) / tan(GlideSlope *
                             DEG_TO_RAD); ✓✓
          DeltaSpeed = StartSpeed - EndSpeed; ✓
          Distance = Distance + ceil(DeltaSpeed / 10) ✓
          Distance = Distance + ceil(Wind / 10) ✓

        Time
        EstimatedTime = (Distance / AverageSpeed) * 60 ✓

        Clear the rich edit
        Add to rich edit:
        Vertical Speed: VerticalSpeed (fpm) - formatted to 2 decimals ✓✓
        Distance: Distance (nm) – formatted to 2 decimals ✓✓
        Estimated Time: EstimatedTime (min) – formatted to 2 decimals ✓✓

                                                         Question 1 Total   40

Copyright reserved                                                     Please turn over

### Page 4

4                               INFORMATION TECHNOLOGY P1                           (EC/SEPTEMBER 2023)

                                                                                             MAX.     MARKS
                                   QUESTION 2                                                MARK    ACHIEVED
2.1.1   Button [Q2.1.1]
         'SELECT FirstName, Surname, Age, Email FROM tblPilots WHERE Age > 35
         AND Age < 43 ORDER BY Age DESC'

        SELECT four correct fields ✓                                                           4
        FROM correct table ✓
        WHERE Age in the range of 36 (incl) and 42 (incl) ✓
        ORDER BY correct field DESC ✓

2.1.2   Button [Q2.1.2]
         'SELECT * FROM tblFlights WHERE Destination LIKE’ + QuotedStr('%' + sLine
         + '%')

        SELECT * (all fields) ✓                                                                4
        FROM correct table ✓
        WHERE Destination LIKE ✓
        QuotedStr(‘%’ + sLine + ‘%’) ✓

2.1.3   Button [Q2.1.3]
         'SELECT count(*) AS [Flights in September] FROM tblFlights WHERE
         Month(DepartureDate) = 9'

        SELECT count(*) ✓AS [Flights in September]                                             3
        FROM tblFlights
        WHERE Month ✓ (DepartureDate) = 9 ✓

2.1.4   Button [Q2.1.4]
         ‘SELECT Destination, Format(sum(PilotCostPerFlight), "Currency") AS [Pilot
         Cost], Format(sum(FlightCost), "Currency") AS [Flight Cost],
         Format(sum(PilotCostPerFlight) + sum(FlightCost), "Currency") AS [Total Cost]
         FROM tblPilots, tblFlights WHERE tblPilots.PilotID = tblFlights.PilotID GROUP
         BY Destination'

        SELECT Destination, ✓ ,
         Format ✓ (sum ✓ (PilotCostPerFlight) ✓, "Currency"✓) AS [Pilot                       12
         Cost] ✓,
         Format(sum(FlightCost), "Currency") AS [Flight Cost], ✓
         Format((sum(PilotCostPerFlight) ✓ + sum(FlightCost) ), ✓
         "Currency") AS [Total Cost]
        FROM both tables ✓ (tblPilots, tblFlights)
        WHERE link between tables ✓ (tblPilots.PilotID = tblFlights.PilotID)
        GROUP BY Destination ✓

2.1.5   Button [Q2.1.5]
         'UPDATE tblPilots SET PilotCostPerFlight = PilotCostPerFlight * 1.07 WHERE
         LicenseType = "CPL"'

        UPDATE correct table ✓                                                                 3
        SET PilotCostPerFlight = PilotCostPerFlight * 1.07 ✓
        WHERE LicenseType = “CPL” ✓

Copyright reserved                                                                       Please turn over

### Page 5

(EC/SEPTEMBER 2023)                    INFORMATION TECHNOLOGY P1                                             5

2.2.1   Button [Q2.2.1]
        if FieldByName('Age').AsInteger < 21 then ✓
                 delete ✓
                                                                                                3
                else
                 next; ✓

2.2.2   Button [Q2.2.2]
        begin
        if Destination = sDestination then ✓
          begin
            if LicenseRequired = 'CPL' then
               inc(iCPL)
            else
              if LicenseRequired = 'PPL' then                ✓
                 inc(iPPL)
                 else
                 if LicenseRequired = 'MPL' then                                                6
                   inc(iMPL);
            if CoPilotRequired = True then ✓
              inc(iCoPilot)
          end ✓ NOTE: Co-Pilot must be inside begin and end, else it counts all the co-
                        pilots and not just the destination co-pilots.
         Next ✓
        end
        Output ('CPL: ' + IntToStr(iCPL) + #13 +
                'PPL: ' + IntToStr(iPPL) + #13 +
                'MPL: ' + IntToStr(iMPL) + #13 +                             ✓
                'Co-Pilots required: ' + IntToStr(iCoPilot));

                                                                         Question 2 Total      35

Copyright reserved                                                                        Please turn over

### Page 6

6                                   INFORMATION TECHNOLOGY P1                            (EC/SEPTEMBER 2023)

                                                                                                  MAX      MARKS
                                          QUESTION 3                                              MARK    ACHIEVED
    3.1.1   Constructor Create
            Correct heading and parameters ✓✓
                 fName                  := sName
                 fManufacturer          := sManufacturer
                 fSpeed                 := rSpeed
                 fHeight                := rHeight
                 fRange                 := rRange
                 fWeight                := rWeight                                                  5
                 fWingspan              := rWingspan
                 fFirepower             := iFirepower
                 fImageName             := sImageName
                 fCountry               := sCountry
                 fDescription           := sDescription
            Correct assigning of all attributes ✓✓✓

    3.1.2   Mutator Method - setValues
            Correct heading (procedure setValues) ✓
                                                                                                    5
            Correct conversion of each attribute ✓✓✓✓

    3.2.1   OnChange event handler of cmbQ3_SelectAircraft
            1.  Extract the user’s selection from the combo box ✓

            2.       Test to see if the text file exists and assign the file. If the file
                     does not exist, display a suitable message and exit
                     AssignFile(MyFile, 'Aircraft_List.csv'); ✓
                      Try ✓
                       Reset(MyFile); ✓
                      except
                       ShowMessage('File not found'); ✓
                       Exit; ✓
                      end; Or alternative: if not (fileexists(textfile) = true) then

            3.       Loop through the text file until the user’s selected aircraft has
                     been found.
                     bFound := False; ✓
                     while (not eof(MyFile)) ✓ AND (bFound = False) ✓ do
                        if pos(UpperCase(sSearch),UpperCase(sOneline)) ✓ <> 0 ✓ then               25
                            bFound := True; ✓

            4.       If the aircraft has been found, then:
                     Loop and extract the information from the text file
                      //Aircraft Name
                          iPos := pos(',',sOneLine); ✓
                          sName := copy(sOneLine,1,iPos-1); ✓
                          delete(sOneLine,1,iPos); ✓
                      //Other fields ✓✓

                     Instantiate (create) the object objAircraft.
                     objAircraft := TAircraft.Create ✓(sName, sManufacturer,
                             rSpeed, rHeight, rRange, rWeight, rWingspan,
                             iFirepower, sImageName, sCountry, sDescription); ✓✓

            5.       Call the setValues method ✓
            6.       Load the object data into the components ✓✓✓✓
                                                                               Question 3 Total    35

Copyright reserved                                                                         Please turn over

### Page 7

(EC/SEPTEMBER 2023)                  INFORMATION TECHNOLOGY P1                                            7

                                                                                              MAX      MARKS
                                   QUESTION 4                                                 MARK    ACHIEVED
  4.1      Extract the destination from the combo box ✓
                                                                                                6
           Transfer/assign destination array to a2Booking ✓✓✓✓✓

  4.2      1. Extract the seat number ✓✓
              Loop through the array to determine if the seat is booked ✓✓
              Display error message if the seat has been booked ✓

           2. Book the seat in a2Booking ✓
              Extract all the data ✓
              Determine class ✓
              Determine price ✓
              If Business class * 1.95 ✓                                                       17
              Display heading Booking Information ✓ in bold ✓
              Display booking ticket information neatly formatted:
                 'Name and Surname: ' + #13#9 + sNameSur + #13 + ✓
                 'Destination: ' + #13#9 + sDestination + #13 +
                 'Date and Time: ' + #13#9 + sDate + #13 +
                           #9 + sTime + ' flight' + #13 +
                 'Cabin: ' + #13#9 + sClass + #13 +
                 'Seat Number: ' + #13#9 + cCol ✓+ IntToStr(iRow + 1)✓+ #13 +
                'Price: ' + #13#9 + FloatToStrF✓ (rPrice,ffCurrency✓,10,2);

  4.3      1. Extract the destination ✓

           2. Loop through ar2Booking and increment the number of
              passengers: Business Class
                  Loop through Rows 0 to 1 ✓
                   Loop through Cols 0 to 4 ✓
                     if ar2Booking[Row,Col] = 'B' then ✓
                        increment(Business Class Counter) ✓
               and Economy Class
                  Loop through Rows 2 to 14 ✓
                   Loop through Cols 0 to 4
                     if ar2Booking[Row,Col] = 'B' then      ✓
                        increment(Economy Class Counter)                                       17

           3. Determine the cost for business class ✓✓and economy class ✓✓

           4. Display booking ticket information neatly formatted:
              'Passengers' + #13 +
                #9 + 'Business Class: ' + IntToStr(iBusClass) + #13 + ✓
                #9 + 'Economy Class: ' + IntToStr(iEcoClass) + #13 + ✓
                #9 + 'Total: ' + IntToStr(iBusClass + iEcoClass) + #13#13 + ✓
              'Cost' + #13 +
                #9 + 'Business Class: ' + FloatToStrF(rBusPrice,ffCurrency,10,2) + #13 + ✓
                #9 + 'Economy Class: ' + FloatToStrF(rEcoPrice,ffCurrency,10,2) + #13 + ✓
                #9 + 'Total Cost: ' + FloatToStrF(rBusPrice + rEcoPrice,ffCurrency,10,2); ✓

                                                                       Question 4 Total        40

Copyright reserved                                                                     Please turn over

### Page 8

8                                    INFORMATION TECHNOLOGY P1           (EC/SEPTEMBER 2023)

SAMPLE SOLUTIONS

QUESTION 1

//////////   40 marks   //////////

////////// Question 1.1 – 4 marks //////////
procedure TfrmQuestion1.btnQ1_1_CostClick(Sender: TObject);
begin
  case rgpQ1_1_License.ItemIndex of
    0 : lblQ1_1_Cost.Caption := 'Microlight Pilot License = R37 000';
    1 : lblQ1_1_Cost.Caption := 'Private Pilot License = R110 451';
    2 : lblQ1_1_Cost.Caption := 'Commercial Pilot License = R761 379';
  end;
end;

////////// Question 1.2.1 – 6 marks //////////
procedure TfrmQuestion1.btnQ1_2_1Click(Sender: TObject);
begin
  shpFrontWheel := TShape.Create(frmQuestion1);
  shpFrontWheel.Parent := pnlQ1_2_Lights;

 with shpFrontWheel do
  begin
    Shape := stCircle;
    Top := 25;
    Left := 35;
    Height := 50;
    Width := 50;
    Brush.Color := clWhite;
  end;
end;

////////// Question 1.2.2 – 1 mark //////////
procedure TfrmQuestion1.btnQ1_2_2_UpClick(Sender: TObject);
begin
  btnQ1_2_1.Click; //Provided code, DO NOT DELETE
  shpFrontWheel.Brush.Color := clRed;
  shpLeftWheel.Brush.Color := clRed;
  shpRightWheel.Brush.Color := clRed;
end;

////////// Question 1.2.3 – 1 mark //////////
procedure TfrmQuestion1.btnQ1_2_3_DownClick(Sender: TObject);
begin
  btnQ1_2_1.Click; //Provided code, DO NOT DELETE
  shpFrontWheel.Brush.Color := clGreen;
  shpLeftWheel.Brush.Color := clGreen;
  shpRightWheel.Brush.Color := clGreen;
end;

Copyright reserved                                                         Please turn over

### Page 9

(EC/SEPTEMBER 2023)                  INFORMATION TECHNOLOGY P1                           9

////////// Question 1.2.4 – 8 marks //////////
procedure TfrmQuestion1.btnQ1_2_4_TestClick(Sender: TObject);
begin
  btnQ1_2_1.Click; //Provided code, DO NOT DELETE
  RandomColours; //Provided code, DO NOT DELETE

 if (shpFrontWheel.Brush.Color = clRed) AND
    (shpLeftWheel.Brush.Color = clRed) AND
    (shpRightWheel.Brush.Color = clRed) then
       MessageDLG('Catastrophic failure!',MTError,[MBOk],0)
 else
 if (shpFrontWheel.Brush.Color = clGreen) AND
    (shpLeftWheel.Brush.Color = clGreen) AND
    (shpRightWheel.Brush.Color = clGreen) then
       MessageDLG('Safe to land',MTInformation,[MBOk],0)
 else
    MessageDLG('Caution, not safe to land',MTInformation,[MBOk],0);

ALTERNATE SOLUTION
var
 iFront, iLeft, iRight, iTotal : Integer;

 iFront := 0;
 iLeft := 0;
 iRight := 0;
 iTotal := 0;
 if shpFrontWheel.Brush.Color = clGreen then
   iFront := 1;
 if shpLeftWheel.Brush.Color = clGreen then
   iLeft := 1;
 if shpRightWheel.Brush.Color = clGreen then
   iRight := 1;

 iTotal := iFront + iLeft + iRight;
 case iTotal of
   0     : MessageDLG('Catastrophic failure!',MTError,[MBOk],0);
   1,2 : MessageDLG('Caution, not safe to land',MTInformation,[MBOk],0);
   3     : MessageDLG('Safe to land',MTInformation,[MBOk],0);
 end;
end;

Copyright reserved                                                    Please turn over

### Page 10

10                           INFORMATION TECHNOLOGY P1                  (EC/SEPTEMBER 2023)

////////// Question 1.3 – 20 marks //////////
procedure TfrmQuestion1.Q1_3_TopOfDescentClick(Sender: TObject);

const DEG_TO_RAD = 0.0174532925;
const NM_TO_FT = 6076.11549;
const FT_TO_NM = 1 / NM_TO_FT;

var
 rAverageSpeed, rStartSpeed, rEndSpeed, rVerticalSpeed, rWind       : Real;
 rGlideSlope, rVerticalSpeed_NM_P_Min                               : Real;
 rStartAltitude, rEndAltitude                                       : Real;
 rDistance, rDeltaAltitude, rDeltaSpeed                             : Real;
 rEstimatedTime                                                     : Real;

begin
//Vertical Speed
  rStartSpeed := StrToFloat(edtQ1_3_StartSpeed.Text);
  rEndSpeed := StrToFloat(edtQ1_3_EndSpeed.Text);
  rWind := StrToFloat(edtQ1_3_Wind.Text);
  rGlideSlope := StrToFloat(edtQ1_3_GlideSlope.Text);

 rAverageSpeed := (rStartSpeed + rEndSpeed) / 2 + rWind;
 rVerticalSpeed_NM_P_Min := (tan(rGlideSlope * DEG_TO_RAD) * rAverageSpeed) / 60;
 rVerticalSpeed := rVerticalSpeed_NM_P_Min * NM_TO_FT;

//Distance
  rStartAltitude := StrToFloat(edtQ1_3_StartAltitude.Text);
  rEndAltitude := StrToFloat(edtQ1_3_EndAltitude.Text);

 rDeltaAltitude := rStartAltitude - rEndAltitude;
 rDistance := (rDeltaAltitude * FT_TO_NM) / tan(rGlideSlope * DEG_TO_RAD);
 rDeltaSpeed := rStartSpeed - rEndSpeed;
 rDistance := rDistance + ceil(rDeltaSpeed / 10);
 rDistance := rDistance + ceil(rWind / 10);

//Time
  rEstimatedTime := (rDistance / rAverageSpeed) * 60;

 redQ1_3.Clear;
 redQ1_3.Lines.Add('Vertical Speed: ' + FloatToStrF(rVerticalSpeed,ffFixed,10,2) + ' (fpm)' +
            #13 +
           'Distance: ' + FloatToStrF(rDistance, ffFixed, 10, 2) + ' (nm)' + #13 +
           'Estimated Time: ' + FloatToStrF(rEstimatedTime, ffFixed, 10, 2) + ' (min)');

end;

Copyright reserved                                                        Please turn over

### Page 11

(EC/SEPTEMBER 2023)                  INFORMATION TECHNOLOGY P1                  11

QUESTION 2

//////////   35 marks   //////////

////////// Question 2.1.1 – 4 marks //////////
procedure TfrmQuestion2.btnQuestion2_1_1Click(Sender: TObject);
// Provided code - DO NOT DELETE OR ALTER //
var
  sSQL1: String;
begin
  /// Enter your code below ///
  sSQL1 := 'SELECT FirstName, Surname, Age, Email ' +
          'FROM tblPilots ' +
          'WHERE Age > 35 AND Age < 43 ' +
          'ORDER BY Age DESC';

 // Provided code - DO NOT DELETE OR ALTER //
 dbCONN.runSQL(sSQL1);
 if length(sSQL1) <> 0 then
   SetGridColumnWidths(dbgSQL);
end;

////////// Question 2.1.2 – 4 marks //////////
procedure TfrmQuestion2.btnQuestion2_1_2Click(Sender: TObject);
// Provided code - DO NOT DELETE OR ALTER //
var
   sSQL2: String;
   sLine : String;
begin
  /// Enter your code below ///
  sLine := InputBox('Destination','Enter the destination','');

  sSQL2 := 'SELECT * ' +
      'FROM tblFlights ' +
      'WHERE Destination LIKE ' + QuotedStr('%' + sLine + '%');

 // Provided code - DO NOT DELETE OR ALTER //
 dbCONN.runSQL(sSQL2);
 if length(sSQL2) <> 0 then
   SetGridColumnWidths(dbgSQL);
end;

////////// Question 2.1.3 - 3 Marks //////////
procedure TfrmQuestion2.btnQuestion2_1_3Click(Sender: TObject);
// Provided code - DO NOT DELETE OR ALTER //
var
  sSQL3 : String;
begin
  /// Enter your code below ///
  sSQL3 := 'SELECT count(*) AS [Flights in September] ' +
          'FROM tblFlights ' +
Copyright reserved                                                Please turn over

### Page 12

12                           INFORMATION TECHNOLOGY P1                     (EC/SEPTEMBER 2023)

       'WHERE Month(DepartureDate) = 9';

 // Provided code - DO NOT DELETE OR ALTER //
 dbCONN.runSQL(sSQL3);
 if length(sSQL3) <> 0 then
   SetGridColumnWidths(dbgSQL);
end;

////////// Question 2.1.4 – 12 marks //////////
procedure TfrmQuestion2.btnQuestion2_1_4Click(Sender: TObject);
// Provided code - DO NOT DELETE OR ALTER //
var
  sSQL4: String;
begin
  /// Enter your code below ///
  sSQL4 := 'SELECT Destination, ' +
          'Format(sum(PilotCostPerFlight), "Currency") AS [Pilot Cost], ' +
          'Format(sum(FlightCost), "Currency") AS [Flight Cost], ' +
          'Format(sum(PilotCostPerFlight) + sum(FlightCost), "Currency") AS [Total Cost] ' +
          'FROM tblPilots, tblFlights ' +
          'WHERE tblPilots.PilotID = tblFlights.PilotID ' +
          'GROUP BY Destination';

 // Provided code - DO NOT DELETE OR ALTER //
 dbCONN.runSQL(sSQL4);
 if length(sSQL4) <> 0 then
   SetGridColumnWidths(dbgSQL);
end;

////////// Question 2.1.5 – 3 marks //////////
procedure TfrmQuestion2.btnQuestion2_1_5Click(Sender: TObject);
// Provided code - DO NOT DELETE OR ALTER //
var
  sSQL5: String;
begin
  /// Enter your code below ///
  sSQL5 := 'UPDATE tblPilots ' +
          'SET PilotCostPerFlight = PilotCostPerFlight * 1.07 ' +
          'WHERE LicenseType = "CPL"';

 // Provided code - DO NOT DELETE OR ALTER //
 dbCONN.executeSQL(sSQL5,dbgPilots,dbgFlights,dbgSQL);
 if length(sSQL5) <> 0 then
   SetGridColumnWidths(dbgSQL);
end;

Copyright reserved                                                           Please turn over

### Page 13

(EC/SEPTEMBER 2023)                INFORMATION TECHNOLOGY P1                           13

////////// Question 2.2.1 – 3 marks //////////
procedure TfrmQuestion2.btnQuestion2_2_1Click(Sender: TObject);
begin
  // Provided code – DO NOT DELETE OR ALTER //
  redQ2_Output.Clear;

with tblPilot do
   begin
    Open;
    redQ2_Output.Lines.Add('Pilots before regulation change: ' + IntToStr(RecordCount));
    First;
    while not (eof) do
      begin
       /// Enter your code below ///
       if FieldByName('Age').AsInteger < 21 then
         Delete
       else
         Next;
      end;
    redQ2_Output.Lines.Add('Pilots after regulation change: ' + IntToStr(RecordCount));
   end;
end;

////////// Question 2.2.2 - 6 Marks //////////
procedure TfrmQuestion2.btnQuestion2_2_2Click(Sender: TObject);

// Provided code – DO NOT DELETE OR ALTER //
var
  sDestination : string;
  iCPL, iPPL, iMPL, iCoPilot : Integer;

begin

// Provided code - DO NOT DELETE OR ALTER //
  redQ2_Output.Clear;
  iCPL := 0;
  iPPL := 0;
  iMPL := 0;
  iCoPilot := 0;

with tblFlight do
  begin
   Open;
   sDestination := cmbQ2_2_2_Destination.Text;
   redQ2_Output.SelAttributes.Style := [fsBold];
   redQ2_Output.Lines.Add(sDestination);
   redQ2_Output.Lines.Add('--------------------------');
   First;

Copyright reserved                                                       Please turn over

### Page 14

14                           INFORMATION TECHNOLOGY P1                   (EC/SEPTEMBER 2023)

 while not (eof) do
     begin
       /// Enter your code below ///
       if FieldByName('Destination').AsString = sDestination then
         begin
           if FieldByName('LicenseRequired').AsString = 'CPL' then
             inc(iCPL)
             else
             if FieldByName('LicenseRequired').AsString = 'PPL' then
               inc(iPPL)
               else
               if FieldByName('LicenseRequired').AsString = 'MPL' then
                 inc(iMPL);
           if (FieldByName('CoPilotRequired').AsBoolean = True) then
             inc(iCoPilot);
         end;
       Next;
     end;
    redQ2_Output.Lines.Add('CPL: ' + IntToStr(iCPL) + #13 +
                       'PPL: ' + IntToStr(iPPL) + #13 +
                       'MPL: ' + IntToStr(iMPL) + #13 +
                       'Co-Pilots required: ' + IntToStr(iCoPilot));
  end;
end;

Copyright reserved                                                         Please turn over

### Page 15

(EC/SEPTEMBER 2023)                  INFORMATION TECHNOLOGY P1                      15

QUESTION 3

//////////   35 marks   //////////

////////// Question 3.1.1 – 5 marks //////////
constructor TAircraft.Create(sName, sManufacturer    : String;
                 rSpeed, rHeight, rRange, rWeight    : Real;
                 rWingspan                           : Real;
                 iFirepower                          : Integer;
                 sImageName, sCountry                : String;
                 sDescription                        : WideString);
begin
    fName          := sName;
    fManufacturer := sManufacturer;
    fSpeed         := rSpeed;
    fHeight        := rHeight;
    fRange         := rRange;
    fWeight        := rWeight;
    fWingspan      := rWingspan;
    fFirepower     := iFirepower;
    fImageName := sImageName;
    fCountry       := sCountry;
    fDescription := sDescription;
end;

////////// Question 3.1.2 – 5 marks //////////
procedure TAircraft.setValues;
begin
    fSpeed     := fSpeed * 1.852;      //Knots converted to KM/h
    fHeight    := fHeight * 0.3048;    //Feet converted to Meters
    fRange     := fRange * 1.60934;    //Miles converted to KM
    fWeight    := fWeight * 0.45359;   //Pounds converted to KG
    fWingspan := fWingspan * 0.3048    //Feet converted to Meters
end;

////////// Question 3.2.1 – 20 marks //////////
procedure TfrmQuestion3.cmbQ3_SelectAircraftChange(Sender: TObject);
var
  sName, sManufacturer, sImageName, sCountry : String;
  rSpeed, rHeight, rRange, rWeight              : Real;
  rWingspan                                     : Real;
  iFirepower                                    : Integer;
  sDescription                                  : Widestring;
  MyFile                                        : Textfile;
  sOneLine                                      : String;
  sSearch                                       : String;
  iPos                                          : Integer;
  bFound                                        : Boolean;

Copyright reserved                                                    Please turn over

### Page 16

16                            INFORMATION TECHNOLOGY P1              (EC/SEPTEMBER 2023)

begin
 sSearch := cmbQ3_SelectAircraft.Text;

 AssignFile(MyFile, 'Aircraft_List.csv');
 try
   Reset(MyFile);
 except
   ShowMessage('File not found');
   Exit;
 end;

 bFound := False;
 Readln(MyFile, sOneLine); //Skip the heading line in the textfile
 while (not eof(MyFile)) AND (bFound = False) do
  begin
   Readln(MyFile, sOneLine);
   if pos(UpperCase(sSearch),UpperCase(sOneline)) <> 0 then
     begin
     //Aircraft Name
       iPos := pos(',',sOneLine);
       sName := copy(sOneLine,1,iPos-1);
       delete(sOneLine,1,iPos);
     //Manufacturer Name
       iPos := pos(',',sOneLine);
       sManufacturer := copy(sOneLine,1,iPos-1);
       delete(sOneLine,1,iPos);
     //Speed
       iPos := pos(',',sOneLine);
       rSpeed := StrToFloat(copy(sOneLine,1,iPos-1));
       delete(sOneLine,1,iPos);
     //Range
       iPos := pos(',',sOneLine);
       rRange := StrToFloat(copy(sOneLine,1,iPos-1));
       delete(sOneLine,1,iPos);
     //Weight
       iPos := pos(',',sOneLine);
       rWeight := StrToFloat(copy(sOneLine,1,iPos-1));
       delete(sOneLine,1,iPos);
     //Height
       iPos := pos(',',sOneLine);
       rHeight := StrToFloat(copy(sOneLine,1,iPos-1));
       delete(sOneLine,1,iPos);
     //Wingspan
       iPos := pos(',',sOneLine);
       rWingspan := StrToFloat(copy(sOneLine,1,iPos-1));
       delete(sOneLine,1,iPos);
     //Firepower
       iPos := pos(',',sOneLine);
       iFirepower := StrToInt(copy(sOneLine,1,iPos-1));
       delete(sOneLine,1,iPos);
     //Image Name
       iPos := pos(',',sOneLine);
       sImageName := copy(sOneLine,1,iPos-1);
Copyright reserved                                                     Please turn over

### Page 17

(EC/SEPTEMBER 2023)             INFORMATION TECHNOLOGY P1                              17

      delete(sOneLine,1,iPos);
    //Country
      iPos := pos(',',sOneLine);
      sCountry := copy(sOneLine,1,iPos-1);
      delete(sOneLine,1,iPos);
    //Description
      sDescription := sOneLine;
    objAircraft := TAircraft.Create(sName,sManufacturer,rSpeed,rHeight,rRange,
                        rWeight,rWingspan,iFirepower,sImageName,sCountry,sDescription);
      bFound := True;
  end;
 end;

 if bFound then
   begin
     objAircraft.SetValues;
     lblQ3_AircraftName.Caption := objAircraft.getName;
     lblQ3_Manufacturer.Caption := objAircraft.getManufacturer;
     imgQ3_CountryFlag.Picture.LoadFromFile('Images\Flags\' + objAircraft.getCountry);
     imgQ3_AircraftImage.Picture.LoadFromFile('Images\Aircraft\' +
          objAircraft.getImageName);
     lblQ3_AircraftDescription.Caption := objAircraft.getDescription;
     lblQ3_MaxSpeed.Caption := FloatToStrF(objAircraft.getSpeed,ffFixed,10,0);
     lblQ3_MaxHeight.Caption := FloatToStrF(objAircraft.getHeight,ffFixed,10,0);
     lblQ3_Range.Caption := FloatToStrF(objAircraft.getRange,ffFixed,10,0);
     lblQ3_MaxTakeoffWeight.Caption := FloatToStrF(objAircraft.getWeight,ffFixed,10,0);
     lblQ3_Wingspan.Caption := FloatToStrF(objAircraft.getWingspan,ffFixed,10,2);
     lblQ3_Firepower.Caption := IntToStr(objAircraft.getFirepower);
   end;
end;

Copyright reserved                                                       Please turn over

### Page 18

18                                   INFORMATION TECHNOLOGY P1   (EC/SEPTEMBER 2023)

QUESTION 4

//////////   40 marks   //////////

////////// Question 4.1 – 6 marks //////////
procedure TfrmQuestion4.cmbQ4_1_DestinationChange(Sender: TObject);
var
  iRow, iCol : Integer;
begin
  case cmbQ4_1_Destination.ItemIndex of //Case or If Statement
    0 : ar2Booking := ar2Bloemfontein;
    1 : ar2Booking := ar2CapeTown;
    2 : ar2Booking := ar2Durban;
    3 : ar2Booking := ar2EastLondon;
    4 : ar2Booking := ar2Johannesburg;
  end;

// //Alternate Solution
// case cmbQ4_Destination.ItemIndex of //Case or If Statement
// 0 : for iRow := 0 to 14 do
//       for iCol := 0 to 4 do
//        ar2Booking[iRow,iCol] := ar2Bloemfontein[iRow,iCol];
// 1 : for iRow := 0 to 14 do
//       for iCol := 0 to 4 do
//        ar2Booking[iRow,iCol] := ar2CapeTown[iRow,iCol];
// 2 : for iRow := 0 to 14 do
//       for iCol := 0 to 4 do
//        ar2Booking[iRow,iCol] := ar2Durban[iRow,iCol];
// 3 : for iRow := 0 to 14 do
//       for iCol := 0 to 4 do
//        ar2Booking[iRow,iCol] := ar2EastLondon[iRow,iCol];
// 4 : for iRow := 0 to 14 do
//       for iCol := 0 to 4 do
//        ar2Booking[iRow,iCol] := ar2Johannesburg[iRow,iCol];
// end;

 //Provide Code - DO NOT DELETE
 PaintColour;
end;

////////// Question 4.2 – 17 marks //////////
procedure TfrmQuestion4.pnlQ4_2_BookClick(Sender: TObject);
var
  sDestination, sDate, sNameSur, sTime : String;
  sClass, sLine : String;
  rPrice : Real;
  iRow, iCol : Integer;
  cCol : Char;
begin

Copyright reserved                                                 Please turn over

### Page 19

(EC/SEPTEMBER 2023)           INFORMATION TECHNOLOGY P1                           19

 redQ4_Output.Clear;
 iRow := sedQ4_RowNumber.Value;

case cmbQ4_ColNumber.ItemIndex of
  0 : begin
       iCol := 0;
       cCol := 'A';
     end;
  1 : begin
       iCol := 1;
       cCol := 'B';
     end;
  2 : begin
       iCol := 3;
       cCol := 'C';
     end;
  3 : begin
       iCol := 4;
       cCol := 'D';
     end;
 end;

 if ar2Booking[iRow-1,iCol] = 'B' then
   MessageDLG('Seat has already been booked',MTInformation,[MBOK],0)
 else
 begin
   ar2Booking[iRow-1,iCol] := 'B';
   sDestination := cmbQ4_1_Destination.Text;
   sDate := DateToStr(dtpQ4_Date.Date);
   sTime := cmbQ4_Time.Text;
   sNameSur := edtQ4_NameSur.Text;
   sClass := 'Economy Class';
   rPrice := arrPrice[cmbQ4_1_Destination.ItemIndex];
   case iRow of
     1,2 : begin
           rPrice := rPrice * 1.95;
           sClass := 'Business Class';
         end;
   end;
   sLine := 'Name and Surname: ' + #13#9 + sNameSur + #13 +
          'Destination: ' + #13#9 + sDestination + #13 +
          'Date and Time: ' + #13#9 + sDate + #13 +
             #9 + sTime + ' flight' + #13 +
          'Cabin: ' + #13#9 + sClass + #13 +
          'Seat Number: ' + #13#9 + cCol + IntToStr(iRow + 1) + #13 +
          'Price: ' + #13#9 + FloatToStrF(rPrice,ffCurrency,10,2);
   redQ4_Output.SelAttributes.Style := [fsBold];
   redQ4_Output.Lines.Add('Booking Information' + #13);
   redQ4_Output.Lines.Add(sLine);
 end;
PaintColour;
end;

Copyright reserved                                                  Please turn over

### Page 20

20                           INFORMATION TECHNOLOGY P1                 (EC/SEPTEMBER 2023)

////////// Question 4.3 - 17 marks //////////
procedure TfrmQuestion4.pnlQ4_3_StatsClick(Sender: TObject);
var
  sLine : String;
  iRow, iCol : Integer;
  iBusClass, iEcoClass : Integer;
  rBusPrice, rEcoPrice : Real;
begin
  redQ4_Output.Clear;
  redQ4_Output.Paragraph.TabCount := 1;
  redQ4_Output.Paragraph.Tab[0] := 10;
  iBusClass := 0;
  iEcoClass := 0;
  rBusPrice := 0;
  rEcoPrice := 0;
  for iRow := 0 to 1 do
    for iCol := 0 to 4 do
      begin
        if ar2Booking[iRow,iCol] = 'B' then
          inc(iBusClass);
      end;

 for iRow := 2 to 14 do
   for iCol := 0 to 4 do
    begin
      if ar2Booking[iRow,iCol] = 'B' then
        inc(iEcoClass);
    end;
 rBusPrice := iBusClass * (arrPrice[cmbQ4_1_Destination.ItemIndex] * 1.95);
 rEcoPrice := iEcoClass * (arrPrice[cmbQ4_1_Destination.ItemIndex]);
 redQ4_Output.SelAttributes.Style := [fsBold];

 sLine := 'Passengers' + #13 +
      #9 + 'Business Class: ' + IntToStr(iBusClass) + #13 +
      #9 + 'Economy Class: ' + IntToStr(iEcoClass) + #13 +
      #9 + 'Total: ' + IntToStr(iBusClass + iEcoClass) + #13#13 +
      'Cost' + #13 +
      #9 + 'Business Class: ' + FloatToStrF(rBusPrice,ffCurrency,10,2) + #13 +
      #9 + 'Economy Class: ' + FloatToStrF(rEcoPrice,ffCurrency,10,2) + #13 +
      #9 + 'Total Cost: ' + FloatToStrF(rBusPrice + rEcoPrice,ffCurrency,10,2);

 redQ4_Output.Lines.Add('Statistics of Flight' + #13);
 redQ4_Output.Lines.Add(sLine);
end;

                                                                         TOTAL:              150

Copyright reserved                                                       Please turn over

## Related documents

- [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
- [INFORMATION TECHNOLOGY P1 GR 12 QP SEPT2020 English](https://www.hlayiso.com/library/information-technology-p1-gr-12-qp-sept2020-english/54a79498-b880-4b85-a745-f97411d425cb) — Information Technology · QP · 2020 · Eng
- [IT P1 GR12 QP SEPT 2019 English](https://www.hlayiso.com/library/it-p1-gr12-qp-sept-2019-english/13baa4c0-c4fc-48ad-be32-a39f4775b286) — Information Technology · QP · 2019 · Eng
- [IT P1 GR12 QP SEPT2018 English](https://www.hlayiso.com/library/it-p1-gr12-qp-sept2018-english/b77b5a5f-75b4-4d23-aaa6-5ab3653b9aeb) — Information Technology · QP · 2018 · Eng
- [IT P2 GR12 MEMO SEPT2021 English](https://www.hlayiso.com/library/it-p2-gr12-memo-sept2021-english/dc6b2b22-5eff-42a1-abf6-da544d6fc4c9) — Information Technology · Memo · 2021 · Eng
- [INFO TECH P2 GR12 MEMO SEPT2017 English](https://www.hlayiso.com/library/info-tech-p2-gr12-memo-sept2017-english/f96c9e7f-ffb6-4de4-8251-890f2b85f074) — Information Technology · Memo · 2017 · Eng

## More from Grade 12 Information Technology

- [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
- [Information Technology P1 Nov 2023 Eng](https://www.hlayiso.com/library/information-technology-p1-nov-2023-eng/8ae9d306-1975-4759-ad2b-96483154bd10) — 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.
