Skip to content

Information Technology Grade 11 P1 2012 Memo

MemorandumInformation TechnologyGrade 11201210 pages

Grade 11 Information Technology Paper 1 memorandum from the Eastern Cape November 2012, 10 pages. Read online or download the free PDF.

Free to read online, no sign-up needed

Answer online

Loading document…

Loading document…

Questions in this paper

Document textSearch extracted text and jump to a page.
Downloaded from hlayiso.com Province of the EASTERN CAPE EDUCATION NATIONAL SENIOR CERTIFICATE GRADE 11 NOVEMBER 2012 INFORMATION TECHNOLOGY P1 INLIGTINGSTEGNOLOGIE V1 MEMORANDUM MARKS/PUNTE: 120 This memorandum consists of 10 pages. Hierdie memorandum bestaan uit 10 bladsye.
Downloaded from hlayiso.com 2 INFORMATION TECHNOLOGY P1 (Memo) (NOVEMBER 2012) QUESTION/VRAAG 1 DATABASE AND DELPHI (30 marks/punte) LO/LU 11.4.15 procedure TForm1.Button1Click(Sender: TObject); begin qrytuckshop.Active := false; qrytuckshop.SQL.text := 'select * from Suppliers order by Supplier'; qrytuckshop.active := true; SetGridColumnWidths(DBGrid1); end; procedure TForm1.Button2Click(Sender: TObject); begin qrytuckshop.Active := false; qrytuckshop.SQL.text := 'select Description, UnitPrice from Stock where Type = "Sweets"'; qrytuckshop.active := true; SetGridColumnWidths(DBGrid1); end; procedure TForm1.Button3Click(Sender: TObject); begin qrytuckshop.Active := false; qrytuckshop.SQL.text := 'select * from Stock where Type = "Chips" and SupplierID = "W2GEL"'; qrytuckshop.active := true; SetGridColumnWidths(DBGrid1); end; procedure TForm1.Button4Click(Sender: TObject); var ssupplier : string; begin ssupplier := inputbox('Enter supplier','','');  qrytuckshop.Active := false; qrytuckshop.SQL.text := 'select * from Suppliers where SupplierNo = "'+ssupplier+'"'; qrytuckshop.active := true; SetGridColumnWidths(DBGrid1); end;
Downloaded from hlayiso.com (NOVEMBER 2012) INLIGTINGSTEGNOLOGIE V1 (Memo) 3 procedure TForm1.Button5Click(Sender: TObject); begin qrytuckshop.Active := false; qrytuckshop.SQL.text := 'select supplier, description, unitprice from Suppliers, Stock where Suppliers.SupplierNo = Stock.SupplierID and (Type like "%Drink%" or Type like "%Water%" or Type like "%Juice%")'; qrytuckshop.active := true; SetGridColumnWidths(DBGrid1); end; procedure TForm1.Button6Click(Sender: TObject); begin qrytuckshop.Active := false; qrytuckshop.SQL.text := 'select count(*)as [Number of Different Sweets]  from Stock where Type = "Sweets"'; qrytuckshop.active := true; SetGridColumnWidths(DBGrid1); end; procedure TForm1.Button7Click(Sender: TObject); begin qrytuckshop.Active := false; qrytuckshop.SQL.text := 'select Stockid, Type, description, unitprice, format (14/100*unitprice, "Currency") as [VAT]  from Stock'; qrytuckshop.active := true; SetGridColumnWidths(DBGrid1); end; procedure TForm1.Button8Click(Sender: TObject); begin qrytuckshop.Active := false; qrytuckshop.SQL.text := 'insert into Suppliers values  ("RJSALE","RJ SALES","21 Union Ave","0437211895")'; qrytuckshop.execsql; qrytuckshop.sql.text := 'select * from suppliers'; qrytuckshop.active := true; SetGridColumnWidths(DBGrid1); end;
Downloaded from hlayiso.com 4 INFORMATION TECHNOLOGY P1 (Memo) (NOVEMBER 2012) QUESTION/VRAAG 2 (40 marks/punte) LO/LU 11.4.8, 11.4.9, 11.4.10 2.1 Declare other arrays (global) 1 Procedure Items under public 1 Procedure Heading 1 Loop 1 Get Item 2 Get Units 2 Get Price per Item 2 10 2.2 Randomize 1 Call statement 1 Columns 1 Heading 2 Initialise profit variable 1 loop 1 Get randomised quantities 1 Calculate excl vat 1 Calculate incl vat 1 Calculate selling price per item 1 Display items and amounts to two decimal places 3 Calculate profit 1 Display profit outside loop to two decimal places 2 17 2.3 Sorting code (3 for swapping matches, 2 for loops, 1 for if) 6 Initialising of variables needed 2 Loop (while) 1 If statement (mod 5 = 0) 1 Increase week counter 1 Display week heading 1 Display learners name 1 13
Downloaded from hlayiso.com (NOVEMBER 2012) INLIGTINGSTEGNOLOGIE V1 (Memo) 5 SAMPLE SOLUTION unit Question2_u; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Menus, StdCtrls, ComCtrls, Buttons; type TForm1 = class(TForm) RichEdit1: TRichEdit; Button1: TButton; Button2: TButton; BitBtn1: TBitBtn; procedure FormActivate(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public procedure Items; end; var Form1: TForm1; arrItem : array[1..50] of string; arrName : array[1..50] of string; arrPrice : array[1..50] of real; arrunits : array[1..50] of integer; icount : integer; arrLearners : array[1..20] of string = ('John','Andrea','Phillip','Sazi','Mihlali','Zac','Gabriella','Lisa','Thomas','Siposethu','Sihle','J ack','Jonathan','Okuhle','Shaun','Henry','Norman','Chantel','Liz','Sophia'); implementation {$R *.dfm} procedure TForm1.FormActivate(Sender: TObject); var myfile : textfile; soneline : string; begin if fileexists('Stock.txt')<>true then begin ShowMessage('File does not exist'); Exit; end;
Downloaded from hlayiso.com 6 INFORMATION TECHNOLOGY P1 (Memo) (NOVEMBER 2012) Reset(myfile); icount := 0; while not eof(myfile) do begin readln(myfile, soneline); inc(icount); arrItem[icount] := soneline; end; closefile(myfile); end; procedure TForm1.Items; var k, ipos, iunits : integer; runitprice : real; begin for k := 1 to icount do begin ipos := pos(',',arrItem[k]); arrName[k] := copy(arrItem[k], 1, ipos -1); delete(arrItem[k],1,ipos); ipos := pos(',',arrItem[k]); arrunits[k] := strtoint(copy(arrItem[k],1,ipos-1)); delete(arrItem[k],1,ipos); ipos := pos(',',arrItem[k]); runitprice := strtofloat(arrItem[k]); arrPrice[k] := runitprice/arrunits[k]; end; end; procedure TForm1.Button1Click(Sender: TObject); var k, iquantity : integer; rvat, rincvat, rexclvat, rselling, rprofit : real; begin Randomize; Items; richedit1.Paragraph.tabcount := 4; richedit1.Paragraph.Tab[0] := 50; richedit1.Paragraph.Tab[1] := 200; richedit1.Paragraph.Tab[2] := 250; richedit1.Paragraph.Tab[3] := 300; richedit1.Paragraph.Tab[4] := 350; richedit1.Lines.add('Quantity'+#9+'Description'+#9+'Excl VAT'+#9+'Incl VAT'+#9+'Selling Price Per Unit'); rprofit := 0; for k := 1 to icount do
Downloaded from hlayiso.com (NOVEMBER 2012) INLIGTINGSTEGNOLOGIE V1 (Memo) 7 Begin iquantity := random(20)+1; rexclvat := arrprice[k]*iquantity*arrunits[k]; rincvat := (arrprice[k] * 14 / 100 + arrprice[k]) * arrunits[k]*iquantity; rselling := (arrprice[k]*14/100+arrprice[k]) + arrprice[k] * 20/100+arrprice[k]; richedit1.lines.add(inttostr(iquantity) + #9 + arrName[k] + #9 + floattostrf(rexclvat, fffixed, 6, 2) + #9+floattostrf(rincvat,fffixed,6,2)+#9+floattostrf(rselling,fffixed,6,2)); rprofit := rprofit + (rselling*iquantity*arrunits[k] - rincvat); end; richedit1.lines.add(''); richedit1.Lines.add('Profit if ALL stock sold: '+floattostrf(rprofit,fffixed,10,2)); end; procedure TForm1.Button2Click(Sender: TObject); var k, l, iweek : integer; stemp : string; begin for k := 1 to 19 do begin for l := k + 1 to 20 do begin if arrlearners[k] > arrlearners[l] then begin stemp := arrlearners[k]; arrlearners[k] := arrlearners[l]; arrlearners[l] := stemp; end; end; end; k := 0; iweek := 0; while k <> 20 do begin if k mod 5 = 0 then begin inc(iweek); richedit1.lines.add(''); richedit1.lines.add('Week '+inttostr(iweek)); end; inc(k); richedit1.lines.Add(arrLearners[k]); end; end; end.
Downloaded from hlayiso.com 8 INFORMATION TECHNOLOGY P1 (Memo) (NOVEMBER 2012) QUESTION/VRAAG 3 (44 marks/punte) 3.1 3.1.1 Function heading 1 Find length 1 If correct true else false 2 3.1.2 Procedure added under public 1 Procedure heading with correct parameters 1 Copy year, month, day 3 If year starts with ‘0’ then add 20 else add 19 2 Create dob in following format yyyy/mm/dd 1 3.1.3 Function heading 1 Copy gender digit 1 If less than 5 then F else M 3 3.1.4 Function heading 1 loop 1 Find odd positions and add 1 Find even positions and form new string 2 Multiply even string by 2 add the digits 2 Add the even and odd answers 1 Subtract the second digit from 10 to create a ‘check’ digit 1 Copy the last digit of id number 1 If the check digit equals the last digit then verify true else false 3 30 3.2 Enter ID number 1 Loop – to ensure that ID number has length of 13 digits; if not display a message 4 and re-enter If correct length then do all call statements and display all info else display 2 message that ID number is invalid Message that ID is verified 1 Call dateofbirth 1 Gender call statement and assign Male and Female 3 Display date of birth 1 Display Gender 1 14 SAMPLE SOLUTION unit Question3_u; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Buttons, StdCtrls, ComCtrls;
Downloaded from hlayiso.com (NOVEMBER 2012) INLIGTINGSTEGNOLOGIE V1 (Memo) 9 type TForm1 = class(TForm) RichEdit1: TRichEdit; Button1: TButton; BitBtn1: TBitBtn; procedure Button1Click(Sender: TObject); private { Private declarations } public procedure dateofbirth(sid:string; var sdob : string); end; var Form1: TForm1; mplementation {$R *.dfm} function lengthid (sid : string) : boolean; begin if length(sid) = 13 then lengthid := true else lengthid := false; end; procedure TForm1.dateofbirth(sid:string; var sdob : string); var syy, syear, smm, sdd : string; begin syy := copy(sid,1,2); if syy[1] = '0' then syear := '20' + syy else syear := '19' + syy; smm := copy(sid,3,2); sdd := copy(sid,5,2); sdob := syear + '/' + smm + '/' + sdd; end; function Gender(sid : string) : char; var igen : integer; begin igen := strtoint(copy(sid,7,1)); if igen < 5 then Gender := 'F' else Gender := 'M'; end;
Downloaded from hlayiso.com 10 INFORMATION TECHNOLOGY P1 (Memo) (NOVEMBER 2012) function Verify(sid : string) : boolean; var k, ioddpos, ieven, ievennum, ianswer, ilast, icheck : integer; sevenpos : string; begin for k := 1 to 12 do begin if k mod 2 = 1 then ioddpos := ioddpos + strtoint(copy(sid,k,1)) else sevenpos := sevenpos + copy(sid,k,1); end; ieven := strtoint(sevenpos) * 2; for k := 1 to length(inttostr(ieven)) do begin ievennum := ievennum + strtoint(copy(inttostr(ieven),k,1)); end; ianswer := ievennum + ioddpos; ilast := 10 - strtoint(copy(inttostr(ianswer),2,1)); icheck := strtoint(copy(sid,13,1)); if ilast = icheck then verify := true else verify := false; end; procedure TForm1.Button1Click(Sender: TObject); var sid, sdob, sgender : string; begin sid := inputbox('Enter ID','',''); while lengthid(sid) = false do begin ShowMessage('ID number must consist of 13 digits'); sid := inputbox('Enter ID','',''); end; if verify(sid) = true then begin richedit1.Lines.add('ID number verified'); dateofbirth(sid,sdob); if gender(sid) = 'M' then sgender := 'Male' else sgender := 'Female'; richedit1.Lines.add('Date of Birth: '+ sdob); richedit1.lines.add('Gender: '+sgender); end else richedit1.lines.add('ID number is invalid'); end; end.

Study this subject

More from Grade 11 Information Technology

View all