Skip to content

Information Technology Grade 12 P1 FS Prelim 2020 Memo (Eng)

MemorandumInformation TechnologyGrade 12202010 pages

Grade 12 Information Technology Paper 1 memorandum from the FS Prelim 2020 (English), 10 pages. Read online or download the free PDF.

Free to read online, no sign-up needed

Answer online

Loading document…

Loading document…

FS Prelim 2020

Questions in this paper

Document textSearch extracted text and jump to a page.
Downloaded from hlayiso.com NATIONAL SENIOR CERTIFICATE Examination Marking Guidelines / Eksamen Nasien Riglyne PREPARATORY EXAMINATION/VOORBEREIDENDE EKSAMEN SEPTEMBER 2020 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. Let op dat die leerders wat 'n alternatiewe oplossing verskaf as wat as voorbeeld van 'n oplossing in die nasienriglyne gegee is volle krediet moet kry vir die relevante oplossing, tensy die spesifieke instruksies in die vraestel nie gevolg is nie of die vereistes van die vraag nie nagekom is nie. These marking guidelines consist of 9 pages. Hierdie nasienriglyne bestaan uit 9 bladsye.
Downloaded from hlayiso.com SUMMARY OF LEARNER'S MARKS / OPSOMMING VAN LEERDER PUNTE NAME/NAAM: QUESTION QUESTION QUESTION QUESTION GRAND TOTAL 1 2 3 4 GROOT TOTAAL VRAAG 1 VRAAG 2 VRAAG 3 VRAAG 4 MAX. MARKS MAKS. 38 40 44 28 150 PUNTE LEARNER'S MARKS LEERDER PUNTE MODERATE MARK GEMODEREERDE PUNTE QUESTION 1: GENERAL PROGRAMMING SKILLS/ VRAAG 1: ALGEMENE PROGRAMMERINGSVAARDIGHEDE (Mark only Eng or Afr please) NAME/NAAM: QUESTION/ MARKS/ DESCRIPTION / BESKRYWING MAX. VRAAG PUNTE 1.1 Button 1.1 procedure TForm1.btn1_1Click(Sender: TObject); begin pnl.Color := claqua; ✓ pnl.Font.Size := 16; ✓ sNumber := IntToStr(sed.Value); ✓ if NOT ✓ (sed.Value IN [1..4] ) ✓ then begin ShowMessage('Number must be from 1 to 4' + #13 + 'Getal moet vanaf 1 en 4 wees'); ✓ 10 sed.Value := 0; ✓ Exit; ✓ end ; img.Picture.LoadFromFile ('Computer' + sNumber + '.bmp'); ✓ img.Stretch:= true; ✓ //Alternative: :Learner can use iNumber and then change to string when image is loaded from file. 1
Downloaded from hlayiso.com 1.2 Button 1.2 sID := edtID.Text; ✓ iMonth := StrToInt(copy ✓ (sID,4,2)); ✓ iYear := StrToInt(copy(sID,7,4)); ✓ if iMonth > monthof ✓ (Date) ✓ then iAge := yearof ✓ (Date) - iYear-1 ✓ else iAge := yearof(Date) - iYear; ✓ edtAge.Text := IntToStr(iAge ✓ //=======================================// 10 Alternative solution. Alternatiewe oplossing sID := edtID.Text; ✓ sTodayDate := DateToStr ✓ (Date); ✓ iTMonth := StrToInt(Copy ✓ (sTodayDate,6,2)); ✓ iTYear := StrToInt(Copy(sTodayDate,1,4)); ✓ iAge := iTYear - iYear; ✓ if iMonth > iTMonth ✓ then iAge := iAge - 1; ✓ edtAge.Text := IntToStr(iAge); ✓ 1.3 Button 1.3 procedure TForm1.btn1_3Click(Sender: TObject); begin sNumber := edt.Text; ✓ iAnswer:= 0; ✓ For iK := 1 to length(sNumber) do ✓ begin if (sNumber[iK] = '0') ✓ OR (sNumber[iK] = '1') ✓ then begin 10 iAnswer := iAnswer * 2 ✓+ StrToInt(sNumber[iK]); ✓ end else begin lbl.Caption := 'Invalid number/Ongeldige getal'; ✓ exit; ✓ end; end; lbl.Caption:= IntToStr(iAnswer); ✓ 1.4 Button 1.4 procedure TForm1.btn1_4Click(Sender: TObject); begin iNum1 := StrtoInt(edt1.text ); iNum2 := StrtoInt(edt2.text ); ✓ while iNum2 <> 0 do ✓ begin 8 iKeep := iNum1 mod iNum2; ✓ iNum1 := iNum2; ✓ iNum2 := iKeep; ✓ end; iGCD := iNum1; ✓ red.Lines.Add ✓ ('The GCD is: ' + IntToStr(iGCD) + ' / Die GGD is: ' + IntToStr(iGCD)); ✓ TOTAAL VRAAG 1/TOTAL QUESTION 1: [38] 2
Downloaded from hlayiso.com QUESTION 2: SQL and DATABASE VRAAG 2 : SQL en DATABASIS (Mark only Eng or Afr please) NAME/NAAM: QUESTION/ MARKS/ DESCRIPTION / BESKRYWING MAX. PUNTE VRAAG SQL Button 2.1.1 'SELECT ActivityName ✓ 2.1.1 FROM tblActivity ✓ 3 WHERE Date = #2019/09/23# ' ✓ 2.1.2 Button 2.1.2 //Given code. Do not mark Gegewe kode. Moenie merk nie sActivity := lst.Items[lst.ItemIndex]; ///////////////////////////////////////////////////////////////////////////////////////////////// 'SELECT Surname, Name, ActivityName ✓ 5 FROM tblLearner ✓ WHERE (Surname Like "M%") ✓ AND ActivityName = ' + QuotedStr(sActivity) ✓ ORDER BY Surname'; ✓ 2.1.3 Button 2.1.3 'SELECT ActivityName, ✓ FORMAT ✓ (Sum ✓ (AmountPaid),"Currency" ✓) AS TotalPaid ✓ 7 FROM tblLearner ✓ GROUP BY ActivityName'; ✓ 2.1.4 Button 2.1.4 'SELECT Surname, tblLearner.ActivityName ✓, Date ✓ FROM tblActivity, tblLearner ✓ 5 WHERE tblActivity.ActivityName=tblLearner.ActivityName✓ AND AmountPaid > 70'; ✓ Sub total / Subtotaal (20) 3
Downloaded from hlayiso.com NAME/NAAM: QUESTION/ MARKS/ DESCRIPTION / BESKRYWING MAX. VRAAG PUNTE ADO Table, ADO Query coding Database calculations, no marks for filter, sort or locate. Databasis berekening, geen punte vir filter, sort of locate 2.2.1 Button 2.2.1 tblActivity.First; ✓ while NOT tblActivity.Eof do ✓ begin tblActivity.Edit; ✓ tblActivity['Cost'] := tblActivity['Cost'] ✓ + 50✓ ; 7 tblActivity.Post; ✓ tblActivity.Next; ✓ end; tblActivity.First; 2.2.2 Button 2.2.2 rTotaal := 0; ✓ tblLearner.First; ✓ while NOT tblLearner.Eof do ✓ begin if tblLearner['ActivityName'] ✓= tblActivity['ActivityName'] ✓ then begin 8 rTotaal := rTotaal + tblLearner['AmountPaid']; ✓ tblLearner.Next; ✓ end; end; red.Lines.Add(FloatToStrF(rTotaal, FFCurrency ,8,2) ✓ + ' already paid for / alreeds betaal vir ' + tblActivity['ActivityName'] ) ; 2.2.3 Button 2.2.3 sPrice := Inputbox('Cost/Koste','What is the cost/Wat is die koste?',''); ✓ tblActivity.Insert; ✓ 5 tblActivity['ActivityName'] := 'Shark diving'; ✓ tblActivity['Date'] := '2019/09/24'; tblActivity['Cost'] := sPrice; ✓ tblActivity.post; ✓ Sub total / Subtotaal (20) [40] TOTAAL VRAAG 2/TOTAL QUESTION 2: 4
Downloaded from hlayiso.com QUESTION 3: OBJECT-ORIENTED PROGRAMMING VRAAG 3: OBJEK-GEORIËNTEERDE PROGRAMMERING (Mark only Eng or Afr please) NAME/NAAM: QUESTION/ MARKS/ DESCRIPTION / BESKRYWING MAX. VRAAG PUNTE Class unit / Klas unit 3.1.1 constructor TMarks.Create(sName: string; iMark1, iMark2, iMark3: integer); ✓ begin fName := sName; ✓ fMark1 := Mark1; 4 fMark2 := Mark2; ✓ fMark3 := Mark3; fAverage := 0; ✓ 3.1.2 procedure TMarks.SetAverage; ✓ begin 3 fAverage := (fMark1 + fMark2 + fMark3) ✓ /3; ✓ end; 3.1.3 procedure TMarks.UpdateAverage ✓ (iMark4: integer); ✓ begin fAverage := (fMark1 + fMark2 + fMark3 +iMark4) ✓ /4; ✓ 4 end; 3.1.4 function TMarks.Price: Boolean; ✓ begin Result := (fAverage > 79); ✓ 2 end; Sub total / Sub totaal 13 5
Downloaded from hlayiso.com Delphi unit (GUI – form)-class (Mark only Eng or Afr please) 3.2.1 Button 3.2.1 {//Try //Reset(tFile); sName:= edt.Text; //Except bFound := False; ✓ //ShowMessage('.....'); //Application.Terminate; If FileExists('Data.txt')<> true ✓ //End;} Still 3 marks then Begin ShowMessage('File does not exists. Lêer bestaan nie'); ✓ Application.Terminate; ✓ end; Assignfile(tFile, 'Data.txt'); ✓ Reset(tFile); while NOT Eof(tfile) ✓ AND (bFound = false) ✓ do Begin Readln(tFile, sOneLine); ✓ 20 iPos := pos('#',sOneLine); ✓ sFileName := Copy(sOneLine,1, iPos-1); ✓ if pos(sName, sFileName) <> 0 then ✓ Begin bFound := True; ✓ Delete(sOneLine, 1, iPos); iPos := pos('#',sOneLine); ✓ iMark1 := StrToInt(Copy(sOneLine,1, iPos -1)); Delete(sOneLine,1,iPos); iPos := pos('#',sOneLine); ✓ iMark2 := StrToInt(Copy(sOneLine,1, iPos -1)); Delete(sOneLine, 1,iPos); iMark3 := StrToInt(Copy(sOneLine,1)); ✓ objMarks := TMarks.Create ✓ (sName, iMark1,iMark2,iMark3 );✓ end ; End; if bFound = True ✓ then ShowMessage('Object successfully instantiated. Objek suksesvol geïnstansieer') ✓ else ShowMessage(sName + ' is not in the list. '+ sName + ' is nie in die lys nie.'); CloseFile(tFile); ✓ 6
Downloaded from hlayiso.com 3.2.2 Button 3.2.2 objMarks.SetAverage; ✓ red.Lines.Add(objMarks.ToString) ; ✓ if objMarks.GetAverage < 40 ✓ then 5 Begin ShowMessage('You qualify for re-assessment.'+ #13 + 'Jy kwalifiseer vir her-assessering'); ✓ sed.Enabled := true; btn3_2_3.Enabled := true; ✓ end; 3..2.3 Button 3.2.3 iMark4 := sed.Value; objMarks.UpdateAverage ✓ (iMark4); //OF/OR(Sed.Value) ✓ 3 red.Lines.Add(objMarks.ToString) ; ✓ 3.2.4 Button 3.2.4 if objMarks.Price ✓ then red.Lines.Add(sName + ': Will receive a price at the price giving'+ #13 + sName + ': Sal ''n prys ontvang by die prysuitdeling') ✓ 3 else red.Lines.Add(sName + ': Will not receive a price at the price giving'+ #13 + sName + ': Sal nie ''n prys ontvang by die prysuitdeling nie'); ✓ Sub total / Sub totaal 31 TOTAAL VRAAG 3/TOTAL QUESTION 3: [44] 7
Downloaded from hlayiso.com QUESTION 4: PROBLEM SOLVING PROGRAMMING VRAAG 4: PROBLEEMOPLOSSINGSPROGRAMMERING (Mark only Eng or Afr please) NAME/NAAM: QUESTION/ MARKS/ DESCRIPTION / BESKRYWING MAX. VRAAG PUNTE 4.1 Button 4.1 For iRow := 1 to 6 do //Vul arr2D random met X en O begin ✓ //Populate the array with X and O for iCol := 1 to 6 do begin iRandom := Random(2); ✓ if iRandom = 1 ✓ 7 then cCross := 'X' ✓ else cCross := 'O'; ✓ arr2D[iRow, iCol] ✓ := cCross; ✓ end; end; end; 4.2 Button 4.2 red.Clear; for iRow := 1 to 6 do ✓ begin sAfvoer := ' ' ; ✓ for iCol := 1 to 6 do ✓ sAfvoer := sAfvoer + # 9 ✓+ arr2D[iRow,iCol] ' ✓ ; red.Lines.Add(sAfvoer) ; ✓ end; 6 ////////////////////////////////////////////////////////////////////////////////////////////////////// Alternative solution red.Lines.Clear; for iRow := 1 to 6 do✓ begin sAfvoer := arr2D[iRow,1]; ✓ for iCol := 2 to 6 do✓ sAfvoer := sAfvoer + #9✓ + arr2D[iRow,iCol] ✓; red.Lines.Add(sAfvoer); ✓ end; 8
Downloaded from hlayiso.com 4.3 Button 4.3 iCrosses := 0; iNoughts := 0; iCrossesD := 0; ✓ iNoughtsD := 0; for iRow := 1 to 6 do begin ✓ for iCol := 1 to 6 do begin If iRow = iCol ✓ // [1,1] , [2,2], [3,3]... Then Begin if arr2D[iRow,iCol] = 'X' ✓ then Inc(iCrosses) ✓ else if arr2D[iRow,iCol] = 'O' ✓ then Inc(iNoughts); ✓ End; end; end; if (iCrosses < 5) AND (iNoughts < 5) ✓ Then 15 begin iPosCol := 6: ✓ //start at right hand corner/begin regs bo for iRow:= 1 to 6 do //1 to 6 do Begin if arr2D[iRow,iPosCol] = 'X' //[1,6] , [2.5] , [3,4]... then Inc(iCrossesD) else if arr2D[iRow,iPosCol] = 'O' ✓ then Inc(iNoughtsD); Dec(iPosCol); ✓ End; End; if (iCrosses > 4) OR (iCrossesD > 4) ✓ then ShowMessage('Crosses win / Kruisies wen') ✓ else if (iNoughts > 4) OR (iNoughtsD > 4) ✓ then ShowMessage('Noughts win / Kringetjies wen') else ShowMessage('No Winner / Geen Wenner'); ✓ (Mark only Eng or Afr please) TOTAAL VRAAG 4/TOTAL QUESTION 4: [28] GRAND TOTAL / GROOT TOTAAL [150] 9

Study this subject

More from Grade 12 Information Technology

View all