Skip to content

Information Technology Grade 12 Paper 1 NSC June 2013 Memo

MemorandumInformation TechnologyGrade 12201316 pages

Grade 12 Information Technology Paper 1 memorandum from the NSC June 2013, 16 pages. Read online or download the free PDF.

Free to read online, no sign-up needed

Answer online

Loading document…

Loading document…

NSC June 2013

Questions in this paper

Document textSearch extracted text and jump to a page.
Downloaded from hlayiso.com ee basic education SWF. Department: ‘q y Basic Education LS“ REPUBLIC OF SOUTH AFRICA SENIOR CERTIFICATE EXAMINATION Z pork Gaaiie e POSSIBLE ANSWERS MARKS: 100 Copyright reserved Please turn over
Downloaded from hlayiso.com Computer Studies/HG/P1 2 DBE/2013 SCE — Memorandum QUESTION 1 unit Question1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtris, ComCtrls; type TForm1 = class(TForm) btnaverage: TButton; btnmore20: TButton; (Caption + Names) VV (2) redOutput: TRichEdit; procedure btnaverageClick(Sender: TObject); procedure btnmore20Click(Sender: TObject); procedure FormActivate(Sender: TObject); private { Private declarations } public { Public declarations } end; type dataplayers = record snamesumame _ : string[30]; V (6) snationality : string[3]; V iruns : integer; V igames__: integer; ¥ raverage_ ; real; ¥ end; var Form1: TForm1; datafile : file of dataplayers; V (2) players : dataplayers; V implementation {$R *.dfm} procedure TForm1.FormActivate(Sender: TObject); Bap ay ee eT = 3; redoutput.Paragraph. Tab[0] := 80; W (2) redoutput.Paragraph. Tab[1] := 150; redoutput.Paragraph.Tab[2] := 250; Randomize; end; Copyright reserved Please turn over
Downloaded from hlayiso.com Computer Studies/HG/P1 3 DBE/2013 SCE — Memorandum procedure TForm1.btnaverageClick(Sender: TObject); begin redoutput.Lines.Clear; AssignFile(datafile, 'worldteam.dat); ¥ Reset(datafile); V redoutput.Lines.Add('Best batters in the world’); redoutput.lines.Add(' '); redoutput.Lines.Add(‘Name and Surname’ + #9 + 'Nationality' + #9 + 'Average runs per game’); v while not Eof(datafile) dov begin read(datafile, players); V with players dov begin v Vv raverage := iruns / igames; redoutput.Lines.Add(snamesurname + #9 + snationality + #9 + floattostrfV (raverage, ffFixed,5,2)); V end; Seek(datafile, filepos(datafile) - 1); WW write(datafile, players); V end; CloseFile(datafile); V end; (16) procedure TForm1.btnmore20Click(Sender: TObject); var inr : integer; snr: string[20]; begin redoutput.Lines.Clear; AssignFile(datafile, 'Worldteam.dat'); Reset(datafile); redoutput.Lines.Add('More than 200 runs per game and not from NZ’); Vv redoutput.lines.Add(''); v redoutput.Lines.Add(‘Name and Surname’ + #9 + 'Number of runs' + #9 + 'Unique number’); Vv while not Eof(datafile) dov begin read(datafile, players); V with players dov begin if (iruns > 200V) and (snationality V <> 'NZ’) then begin inr = Random (20) + 1¥; snr := snamesurname[1] + inttostr(inr) + Copy(snationality, 1,2) y; redoutput.Lines.Add(snamesurname + #9 + inttostr(iruns) + #9 + snr) y; end; end; end; CloseFile(datafile); V end; end. . (15) [43] Copyright reserved Please turn over
Downloaded from hlayiso.com Computer Studies/HG/P1 4 DBE/2013 SCE — Memorandum QUESTION 2 unit q2memo; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtris, ComCtris; type TForm1 = class(TForm) btndisplay: TButton; redoutput: TRichEdit; btnsearch: TButton; lbidisplay: TLabel; procedure FormActivate(Sender: TObject); procedure btndisplayClick(Sender: TObject); procedure btnsearchClick(Sender: TObject); private { Private declarations } public { Public declarations } end; type Tskik1 = array[1..20] of pil a Vv Tskik2 = array[1..20] of real; var Form1: TForm1; icount : Integer; sproductcode : Tskik1; gevind : Boolean; sproductdescription : Tskik1; V (3) productprice : Tskik2; implementation {$R *.dfm} procedure findproduct(pfindproduct : string;psproductcode : tskik1; picount : Integer; var pfound : Boolean); ¥ var k :Integer; begin pfound := False; ¥ k= 4; ¥ while not(pfound) and (k <= picount v) do begin if pfindproduct = psproductcode{k] V then pfound := True ¥ else k:=k+t1)¥ (7) end; end; Copyright reserved Please turn over
Downloaded from hlayiso.com Computer Studies/HG/P1 5 DBE/2013 SCE — Memorandum function average(fsproductcode : Tskik1; fproductprice : Tskik2):Real; ¥ var k: integer; rsum , raverage : real; iamount : integer; sproductcodefirst : string[1]; begin rsum := 0; ¥ iamount := 0; ¥ for k := 1 to icount do V begin sproductcodefirst := Copy(sproductcode[k],1,1) v; if sproductcodefirst = 'C' ¥ then begin Inc(iamount) ¥; rsum := rsum + productprice[k] ¥; end; end; raverage := rsum / iamount v; result := raverage V; (10) procedure TForm1.FormActivate(Sender: TObject); var cricket : Textfile; sline : string; icomma : integer; begin redoutput.Paragraph. TabCount := 2; redoutput. Paragraph. Tab[0] := 100; redoutput.Paragraph.Tab[1] := 200; AssignFile(cricket, ‘stock. txt’) V; Reset(cricket) ¥; icount := 0 V; While not Eof(cricket) do V begin Inc(icount) Vv; Readin(cricket, sline) v; icomma := Pos(',’, sline) v; sproductcodeficount] := Copy(sline, 1, icomma -1); Delete(sline, 1, icomma); icomma := Pos(',’, sline); WW sproductdescription[icount] := Copy(sline, 1, icomma -1); Delete(sline, 1, icomma); productprice[icount] := strtofloat(sline) V; (10) end; end; Copyright reserved Please turn over
Downloaded from hlayiso.com Computer Studies/HG/P1 6 SCE — Memorandum procedure TForm1.btnsearchClick(Sender: TObject); var ssearchproduct : string; begin ssearchproduct := InputBox('Productcode’, 'Tik die produk se kode in’, ') \; findproduct(ssearchproduct, sproductcode ,icount, gevind) y; if gevind then Ibidisplay.caption := ssearchproduct + ' was found’ ¥ else Ibidisplay.caption := ssearchproduct + ' was not found’; ¥ end; procedure TForm1.btndisplayClick(Sender: TObject); var k : integer, raverage : Real; rsum : Real; iamount : integer; raverage : Real; begin redoutput.Lines.Add('Productcode’ + #9 + 'Productdescription' + #9 + 'Productprice’) y; redoutput.Lines.Add(' '); for k := 1 to icount do redoutput.lines.add(sproductcode[k] + #9 + sproductdescription[k] + #9 + FloatToStrf(productprice[k],ffCurrency, 7,2)) Vv; raverage := average(sproductcode, productprice) V; redoutput.Lines.Add(' '); redoutput.Lines.Add('The average price is: ' +FloatToStrf(raverage V, ffCurrency V, 8, 2)) ; end; end. DBE/2013 (4) (5) [39] Copyright reserved Please turn over
Downloaded from hlayiso.com Computer Studies/HG/P1 ih DBE/2013 SCE — Memorandum QUESTION 3 unit q3umemo; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Buttons, StdCtrls, ComCtris, Spin; type TForm1 = class(TForm) btnadd: TButton; reddisplay: TRichEdit; btnclose: TBitBtn; btndisplay: TButton; procedure btnaddClick(Sender: TObject); procedure btndisplayClick(Sender: TObject); procedure FormActivate(Sender: TObject); private { Private declarations } public. { Public declarations } end; type Tskik = array[1..15] of Integer; ¥ (2) var Form1: TForm1; ¥ arramount : Tskik; icount : integer; implementation {SR *.dfm} procedure sort(var Vv arramount : tskik ¥); var temp, k, j : Integer; V begin for k := 1 to icount - 1 do ¥ begin for j =k + 1 to icount do ¥ begin if (arramount{k] < arramount{j]) ¥ then begin (9) temp := arramount[k]; V arramount{k] := arramount{j]; V arramount{j] := temp; V end; end; end; end; Copyright reserved Please turn over
Downloaded from hlayiso.com Computer Studies/HG/P1 8 DBE/2013 SCE — Memorandum procedure TForm1.btnaddClick(Sender: TObject); var k, j : Integer; begin (3) Inc(icount); V arramountficount] ¥ := StrToint(InputBox('Type in the runs’, 'Runs’,")) ¥ end; procedure TForm1.btndisplayClick(Sender: TObject); var K: integer; begin reddisplay.Clear; sort(arramount); ¥ for k := 1 to icount do ¥ reddisplay.Lines.add(IntToStr(arramount[k])); V (3) end; end; procedure TForm1.FormActivate(Sender: TObject); begin arramount[1] := 20; arramount{2] := 132; arramount{[3] := 43; arramount{[4] := 52; arramount[5] := 430; arramount{[6] := 320; arramount[7] := 230; arramount{[8] := 167; arramount[9] := 140; arramount[10] := 80; icount := 10; (1) end; end. [18] TOTAL: 100 Copyright reserved
Downloaded from hlayiso.com basic education Department: Basic Education REPUBLIC OF SOUTH AFRICA SENIORSERTIFIKAAT-EKSAMEN REKENAARSTUDIEVi MEMORANDUM PUNTE: 100 Hierdie memorandum bestaan uit 8 bladsye. Kopiereg voorbehou Blaai om asseblief
Downloaded from hlayiso.com Rekenaarstudie/HG/V1 2 DBE/2013 SSE — Memorandum VRAAG 1 unit vrimemo_u; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtris, ComCtris; type TForm1 = class(TForm) btngemid: TButton; redafvoer: TRichEdit; btnmeeras20: TButton; (Caption + Names) VY (2) procedure FormActivate(Sender: TObject); procedure btngemidClick(Sender: TObject); procedure btnmeeras20Click(Sender: TObject); private { Private declarations } public { Public declarations } end; type dataspelsers = record snaamvan : String[30]; ¥ (6) snasionaliteit : string[3]; ¥ iaantallopies : integer; ¥ iaantalwed _ : integer, Vv tgemlopies __: real; ¥ end; var Form1: TForm1; dataleer : file of dataspelsers; Vv (2) spelers : dataspelsers; implementation {$R *.dfm} procedure TForm1.FormActivate(Sender: TObject); begin redafvoer.Paragraph. TabCount := 3; redafvoer.Paragraph. Tab[0] := 80; tedafvoer.Paragraph. Tab[1]} := 150; vv redafvoer.Paragraph. Tab[2] := 250; Randomize; end; (2) Kopiereg voorbehou Blaai om asseblief
Downloaded from hlayiso.com Rekenaarstudie/HG/V1 3 DBE/2013 SSE — Memorandum procedure TForm1.btngemidClick(Sender: TObject); begin redafvoer.Lines.Clear; AssignFile(dataleer, 'wereldspan.dat'); “ Reset(dataleer); v tedafvoer.Lines.Add('Beste kolwers in wéreld'); “ redafvoer.lines.Add(' '); redafvoer.Lines.Add('Naam' + #9 + 'Nasionaliteit' + #9 + 'Gemiddelde lopies per wedstryd'); “ while not Eof(dataleer) do Vv begin read(dataleer, spelers); ¥ with spelers do Vv begin rgemlopies := iaantallopies V / iaantalwed V; redafvoer.Lines.Add(snaamvan + #9 + snasionaliteit + #9 + floattostrf V (rgemlopies, ffFixed,5,2)); “ end; Seek(dataleer, filepos(dataleer “) - 1) V; write(dataleer, spelers) v; end; CloseFile(dataleer) v’; end; (16) procedure TForm1.btnmeeras20Click(Sender: TObject); var snr: string; inr : integer; begin tedafvoer.Lines.Clear; AssignFile(dataleer, 'wereldspan.dat’); Reset(dataleer); redafvoer.Lines.Add('Meer as 200 lopies per wedstryd en nie van NZ’); “ redafvoer.lines.Add(' '); ¥ redafvoer.Lines.Add('Naam!' + #9 + ‘Aantal lopies'+ #9 + 'Unieke nr); ¥ while not Eof(dataleer) do v begin read(dataleer, spelers); V with spelers do V begin if (iaantallopies V > 200) and (snasionaliteit “ <> 'NZ’) then begin inr := Random VY (20) + 1v; snr := snaamvan[1] + IntToStr(inr) + copy(snasionaliteit,1,2); Vv redafvoer.Lines.Add(snaamvan + #9 + inttostr(iaantallopies)+ #9 +snr); end; end; end; CloseFile(dataleer); “ end; end. (15) [43] Kopiereg voorbehou Blaai om asseblief
Downloaded from hlayiso.com Rekenaarstudie/HG/V1 4 DBE/2013 SSE — Memorandum VRAAG 2 unit Vraag2; {Memo} interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtris, ComCtris; type TForm1 = class(TForm) redafvoer: TRichEdit; btnsoek: TButton; Iblafvoer: TLabel; btnafvoer: TButton; procedure FormActivate(Sender: TObject); procedure btnsoekClick(Sender: TObject); procedure btnafvoerClick(Sender: TObject); private { Private declarations } public. { Public declarations } end; type Tskik1 = array[1..20] of string[20]; v Tskik2 = array[1..20] of real; “ var Form1: TForm1; itel : Integer; sprodukkode : Tskik1; ” (3) gevind : Boolean; sprodukbeskryf : Tskik1; rprodukprys : Tskik2; implementation {$R *.dfm} procedure soekproduk(pssoekproduk : string; psprodukkode : tskik1; pitel : Integer; var pgevind : Boolean); ¥ var k :Integer; begin pgevind := False; “ k:=1; v while not(pgevind) and (k <= pitelv’) do begin if pssoekproduk = psprodukkode[k] ~ then pgevind := True Vv else ki=k+15;¥% (7) end; . end; Kopiereg voorbehou Blaai om asseblief
Downloaded from hlayiso.com Rekenaarstudie/4G/V1 5 DBE/2013 SSE — Memorandum function gemiddeld(fsprodukkode : Tskik1; frprodukprys : Tskik2):Real; ¥ var k: integer; rsom , rgem : real; iaantal : integer; sprodukkodeeerste : string[1]; begin Trsom := 0; ¥ iaantal := 0; ¥ for k := 1 to itel do “” begin sprodukkodeeerste := Copy(fsprodukkode[k], 1,1); if sprodukkodeeerste = 'C' V then begin Inc(iaantal); ¥ rsom := rsom + frprodukprys[k]; “” end; end; rgem := rsom / iaantal; ¥ Tesult := rgem; ¥ (10) end; procedure TForm1.FormActivate(Sender: TObject); var krieket : Textfile; slyn _: string; ikomma : integer; begin redafvoer.Paragraph. TabCount := 2; redafvoer.Paragraph. Tab[0] := 100; redafvoer.Paragraph. Tab[1] := 200; AssignFile(krieket, 'Voorraad.txt'); Reset(krieket); ¥ itel := 0; ¥ While not Eof(krieket) do W begin Inc(itel); ¥ Readin(krieket, slyn); ¥ ikomma := Pos(',', slyn); ~ sprodukkode[itel] := Copy(slyn, 1, ikomma -1); vv Delete(slyn, 1, ikomma); ikomma := Pos(’,', slyn); sprodukbeskryffitel] := Copy(slyn, 1, ikomma -1); Delete(slyn, 1, ikomma); rprodukprys[itel] := strtofloat(slyn); “ (10) end; end; Kopiereg voorbehou Blaai om asseblief
Downloaded from hlayiso.com Rekenaarstudie/HG/V1 6 DBE/2013 SSE — Memorandum procedure TForm1.btnsoekClick(Sender: TObject); var ssoekproduk : string; begin ssoekproduk := InputBox('Produkkode’, 'Tik die produk se kode in’,''); ¥ soekproduk(ssoekproduk, sprodukkode ,itel, gevind); ¥ if gevind then Iblafvoer.caption := ssoekproduk + ' is gekry' ¥ else Iblafvoer.caption := ssoekproduk + ' is nie gekry nie’; ¥ (4) end; procedure TForm1 .btnafvoerClick(Sender: TObject); var k : integer; tgemiddeld : Real; rsom : Real; iaantal : integer; rgem : Real; begin redafvoer.Lines.Add('Produkkode' + #9 + 'Produkbeskrywing' + #9 + 'Produk se prys'); ¥ redafvoer.Lines.Add(' '); for k := 1 to itel do redafvoer.lines.add(sprodukkode[k] + #9 + sprodukbeskryf[k] + #9 + FloatToStrf(rprodukprys|k],ffCurrency, 7,2)); ¥ tgemiddeld := gemiddeld(sprodukkode, rprodukprys); “ redafvoer.Lines.Add(' '); redafvoer.Lines.Add(‘Die gemiddelde pyrs is: ' +FloatToStrf(rgemiddeldv’,, ffCurrency”’, 8, 2)) ; end; (5) end. [39] Kopiereg voorbehou Blaai om asseblief
Downloaded from hlayiso.com Rekenaarstudie/HG/V1 7 DBE/2013 SSE — Memorandum VRAAG 3 unit vr3_u; {memo} interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Buttons, StdCtris, ComCtrls, Spin; type TForm1 = class(TForm) btnvoegby: TButton; redafvoer: TRichEdit; btnclose: TBitBtn; btnafvoer: TButton; procedure btnvoegbyClick(Sender: TObject); procedure btnafvoerClick(Sender: TObject); procedure FormActivate(Sender: TObject); private { Private declarations } public { Public declarations } end; pe Tskik = array[1..15] of Integer; “ (2) var Form1: TForm1; arraantal : Tskik; ¥ itel : integer; implementation {$R *.dfm} procedure sorteer(var Y arraantal : tskik ); var temp, k,j : Integer; “ begin for k := 1 to itel - 1do V begin for j =k + 1 to itel do V begin (9) if (arraantal[k] < arraantall[j]) ¥ then begin temp := arraantal[k]; ¥ arraantal[k] := arraantall[j]; “ arraantall[j] :-= temp; “ end; end; end; end; Kopiereg voorbehou Blaai om asseblief
Downloaded from hlayiso.com Rekenaarstudie/HG/V1 8 SSE — Memorandum procedure TForm1.btnvoegbyClick(Sender: TObject); var k, j, m: Integer; begin inc(itel); ~ arraantallitel] := StrToint(InputBox(‘Tik "n punt in: ','Punt’,")); “ end; procedure TForm1.btnafvoerClick(Sender: TObject); var K: integer; begin redafvoer.Clear, sorteer(arraantal); ¥ for k := 1 to itel do Vv begin tedafvoer.Lines.add(IntToStr(arraantal[k])); “ end; end; procedure TForm1.FormActivate(Sender: TObject); arraantal[6] := 320; arraantal[7] := 230; arraantal[8] := 167; arraantal[9] := 140; arraantal[10] := 80; itel = 10; ¥ end; end. Kopiereg voorbehou DBE/2013 (3) (3) (1) [18] TOTAAL: 100

Study this subject

More from Grade 12 Information Technology

View all