Skip to content

Information Technology Grade 12 GAU Prelim 2021 Memo

MemorandumInformation TechnologyGrade 12202111 pages

Grade 12 Information Technology memorandum from the GAU Prelim 2021, 11 pages. Read online or get the free PDF download, question paper linked when available.

Free to read online, no sign-up needed

Loading document…

Loading document…

GAU Prelim 2021

Document textSearch extracted text and jump to a page.
Downloaded from hlayiso.com PRELIMINARY EXAMINATION GRADE 12 INFORMATION TECHNOLOGY P1 AUGUST 2021 MARKING GUIDELINES MARKS: 150 TIME: 3 hours This marking guideline consists 11 pages 1
Downloaded from hlayiso.com Learner : QUESTION 1: GENERAL PROGRAMMING SKILLS Description Mark Learner Mark //Question 1.1.1 sContactNumber := edtContact.Text; ✓ if ✓sContactNumber = '' ✓then 5 begin showMessage('A contact number must be entered in');✓ edtContact.SetFocus;✓ exit; end; //Question 1.1.2 const SuperiorBread = 15.50; BestoBoth = 13.75; ✓ // for correct constants UltimaSeeded = 17.50; 9 iAantal := sedQuantity.Value;✓ case ✓ ccbType.ItemIndex of ✓ 0 : ✓ rAmountPay ✓:= BestoBoth✓*iAantal + 5;✓ 1 : rAmountPay := SuperiorBread*iAantal + 5; ✓ 2 : rAmountPay := UltimaSeeded*iAantal + 5; end; // Can use nested if also //Question 1.1.3 iSubtotal := 0; ✓ for i := 1 to length✓(sContactNumber) do ✓ begin if (i mod 2 = 0) then ✓ 7 begin inc(iSubtotal,✓ strtoInt(sContactNumber[i])); ✓ end; end; iControlNumber := iSubtotal DIV 11 ; ✓ 2
Downloaded from hlayiso.com //Question 1.1.4 7 sBestelNr := lowercase✓(copy(sName,1,2))✓+intToStr✓(iControlNumber)✓ +'/'✓+dateToStr✓(date)✓; //Question 1.1.5 edtOrderNumber.Text := sBestelNr;✓ 6 edtPay.Text ✓:= floatTostrF(rAmountPay,ffCURRENCY✓,6,2✓); gbxRegister.Color := clGreen;✓ imgCourier.Picture.LoadFromFile('GreenBicycle.jpg');✓ end; procedure TfrmBreadCycling.bmbNextClick(Sender: TObject); begin // Given Code redoutput.Clear; 3 // Question 1.2 gbxAdmin.Visible := True; ✓ rTotalAmount := rTotalAmount + rAmountPay; ✓ inc(iCountCustomers); ✓ end; procedure TfrmBreadCycling.btnAdminClick(Sender: TObject); begin // Question 1.3 redOutput.Lines.Add✓('The total received for the day: '+ floatToStrF(rTotalAmount,ffCurrency, 6, 2));✓ 3 redOutput.Lines.Add('The total number of clients for the day: '+ intToStr(iCountCustomers));✓ end; TOTAL SECTION B 40 3
Downloaded from hlayiso.com Learner : QUESTION 2: SQL AND DATABASE MAX. LEARNER’S QUESTION DESCRIPTION MARK MARKS 2.1 SQL statements Button [2.1.1 – List of jobs] SELECT * FROM tbljobs Order by job, period desc 2.1.1 Concepts 4 SELECT * FROM tbljobs Order by job , period desc Button [2.1.2 – Surgeons] SELECT Job, Startdate from tbljobs where Job like "%surgeon" 2.1.2 4 Concepts SELECT Job, Startdate from tbljobs where Job like "% surgeon" Button [2.1.3 – Ships start 30 July 2022] SELECT Ship,Country,Job From tblJobs,tblShips where tblJobs.ShipID = tblShips.ID and Startdate = #2022/07/30# 2.1.3 4 Concepts SELECT Ship, Country, Job From tblJobs,tblShips where tblJobs.ShipID = tblShips.ID and Startdate = #2022/07/30 # ' 4
Downloaded from hlayiso.com Button [2.1.4 – Average per Department] SELECT Department, int(avg(period)) as [Average per department] from tblJobs group by department 2.1.4 4 Concepts SELECT Department, int (avg (period)) as [Average per department] from tblJobs group by department Button [2.1.5 – Total Allowance] SELECT Job , format ((allowance * period)* 14.09,"currency") as Rands from tbljobs where department = "Marine Deck" 2.1.5 4 'SELECT Job , format ((allowance * period)* 14.09 , "currency" ) as Rands from tbljobs where department = "Marine Deck" ' Subtotal 20 5
Downloaded from hlayiso.com 2.2 Database manipulation using Delphi code Button [2.2.1 - Crew Capacity] Input Ship and capacity fields from tblShips Initialise Counter Set tblJobs to start reading from first record ✔ Loop through tblJobs ✔ If PK in tblShips = FK in tblJobs ✔ 2.2.1 Increment the counter ✔ 12 Go to next record ✔ Calculate difference between counter and capacity in ship table ✔ If Ship has capacity ✔ Display ship name✔, counter✔ in message in richedit Else ✔ display that ship has no capacity MAX. LEARNER’S QUESTION DESCRIPTION MARK MARKS Button [Q2.2.2 – Delete position] 2.2.2 Move to last record of tblJobs✔ 2 Delete record✔ Button [Q2.2.3 – Add new position] tblJobs.Insert; tblJobs['Job'] : 🡨 'Deck Hand'; tblJobs['Department'] 🡨 'Marine Deck'; 2.2.3 tblJobs['Period'] 🡨 12; 6 tblJobs['Allowance'] 🡨 150; tblJobs['ShipID'] 🡨 tblShips['ID']; tblJobs['Startdate'] 🡨 Date + 365 ; tblJobs.Post; Subtotal 20 TOTAL SECTION B 40 6
Downloaded from hlayiso.com Learner : QUESTION 3: OBJECT ORIENTED PROGRAMMING LEARNER: MAX. LEARNER’S QUESTION DESCRIPTION MARK MARKS 3.1 CLASS UNIT (TCarWash_u) 3.1.1 fCarReg✓ : string; (attribute with class scope) ✓ 2 Constructor CREATE(iWashtype: integer; sCarType: string); ✓ Definition: fWashType := iWashtype; } 3.1.2 3 fCarType := sCarType; }✓ fCarReg := ''; ✓ setRegistration (Procedure✓) declared correctly (public) parameter✓ 3.1.3 3 Implementation correct Definition: fCarReg := sCarReg✓ Definition of DetermineCost AUX method: • CASE fWashtype / Nested if-else used correctly✓ • Type 0 (or adjusted 1) → result := 3.1.4 StartingWashPrice✓ 3 • SWP + 20 for item 1 & SWP + 40 for item 2. ✓ OR result := StartingWashPrice ✓c fWashType✓ * 20; ✓ Definition of ToString method: • VALIDRegistration called CORRECTLY ✓ • Valid / Invalid determined ✓ 3.1.5 • Concatenation of attributes for result: 5 o WashType & CarType added with #13✓ o fCarReg & Valid/Invalid correctly concat. ✓ o DetermineCost method used with FTSF✓ Subtotal Q3.1: 16 7
Downloaded from hlayiso.com 3.2 MAIN FORM UNIT Button Q3.2.1 CLICK: • Clear redDisplay✓ • Instantiate objCarWash correctly✓ with 3.2.1 rgp.ItemIndex & cbx.Text as parameters✓ 6 • Call mutator setRegistration✓ with lbledt par✓ • Call obj.toString with red.Lines.Add✓ Button Q3.2.2 CLICK: • IF FileExists(‘Gauteng.txt’) <> True / = False✓ then o Showmessage✓ o Application.terminate✓ • AssignFile & Reset✓ • While NOT Eof(tFile) DO✓ o readln✓ o COPY (with POS for #✓) and/or DELETE used correctly once✓ o Conditional loop until no more #’s found (WITHIN while-loop) ✓ 3.2.2 ▪ Instantiate objcarwash with 18 extracted values related to name & car type in cbx✓ ▪ Total = Total + obj.DetermineCost✓ ▪ Remove car and wash type digits✓ o Compare (if) top total with initialized / cumulative total✓ ▪ Adjust Top name if total is top✓ o Adjust Grand total funds✓ o Add name + name’s total with FTSF✓ • Total Funds added correctly OUTSIDE While✓ • Top Performer added correctly (Koos) ✓ Subtotal Q3.2: 24 TOTAL SECTION C: 40 TOTAL SECTION C: 40 8
Downloaded from hlayiso.com Learner : QUESTION 4: PROBLEM-SOLVING PROGRAMMING MAX. LEARNER’S QUESTION DESCRIPTION MARK MARKS 4.1 Column headings : appropriate indexes and loop 1 structur copy entries from arrBudget to 1 column headings for iRow := 1 to 6 do✓ stgDisplayBudget.Cells[0,iRow] := arrNpOs[iRow]; ✓ NPO names : appropriate indexes and loop structure 1 copy names from arrNGO to sgd col[0] or 1 red lines 1 to 6 for iCol := 1 to 5 do✓ stgDisplayBudget.Cells[iCol,0] := arrheadings[iCol]; ✓ Financial data : appropriate indexes and embedded loop 2 structure conversion floattostring (irrespective of 1 method used) for iRow := 1 to 6 do ✓ begin for iCol := 1 to 3 do ✓ begin stgDisplayBudget.Cells[iCol,iRow] := floatToStr(arrData[iRow,iCol]); ✓ end; //next column end; //next row end; Total for question 4.1 7 4.2 Declare variables e.g. rTotal, rPerc 1 Initialize rTotal 1 Nested loop 2 Determine rTotal 1 Calculate rPerc 1 Assign to strGrid opjects 2 Display with conversion 1 var iRow,iCol : Integer; 9
Downloaded from hlayiso.com rTotal, rToBenef : real; ✓ begin // 4.2 for iRow := 1 to 6 do ✓ begin rTotal := 0; ✓ for iCol := 1 to 3 do✓ begin rTotal := rTotal + arrData[iRow,iCol]; ✓ end; //next column stgDisplayBudget.Cells[4,iRow] := floatToStr(rTotal); ✓ rToBenef := arrData[iRow,3]; ✓ stgDisplayBudget.Cells[5,iRow] := floatToStrF(rToBenef/rTotal*100,ffCurrency,6,2) ;✓ arrPerc[iRow] := rToBenef/rTotal*100; //arr used for report✓ end; //next row Total for question 4.2 9 4.3 Declare rAverage and rTotal 1 Initialize rAverage and rTotal 1 Loop 1 Calculate average percentage 2 Write line NPO with highest percentage 1 Loop through 6 values Identify highest % and link that perc. to NPO to which it 3 belongs Write line to report 1 Initialise number of NPOs to 0, loop through 6 values 1 Count number of NPO’s allocating higher than avg 2 percentage Write line to red report 1 var iRow,iHighRow,iNPOs : Integer; rHighPerc,rAvgPerc : Real; ✓ begin // 4.3 rHighPerc := -1; rAvgPerc := 0; ✓ for iRow := 1 to 6 do✓ begin rAvgPerc := rAvgPerc + arrPerc[iRow]; //SUM before dividing by 6 ✓ if arrPerc[iRow] > rHighPerc then✓ begin rHighPerc := arrPerc[iRow]; ✓ 10
Downloaded from hlayiso.com iHighRow := iRow; ✓ end; end; redReport.Lines.Clear; rAvgPerc := rAvgPerc / 6; ✓ redReport.Lines.Add('Avg/Gem % = '+ FloatTostrf(rAvgPerc,fffixed,10,2)); ✓ redReport.Lines.Add('High/Hoogste NPO = '+ stgDisplayBudget.Cells[0,iHighRow]); ✓ Total for question 4.3 14 TOTAL for Question 4 30 GRAND TOTAL: 150 11

Study this subject

More from Grade 12 Information Technology

View all