This section provides a quick preview of questions from the document. It may not display every question or the complete wording of each one. For the full content, including diagrams, tables and other information, view the original PDF above.
Q1โ Section header โ
1.1Bu tton [1.1 Gender Set the caption to "Gender" Add the option "Male" Set the
1.2Button [1.2 Random day Declare an integer variable for the random number Generate random number in correct range (1 7\
1.3Button [
1.3Calculate] 11 Declare suitable variable Extract year
1.1OR rBonus := rBonus + rB onus
0.1Display bonus in a dialog ue box formatted to currency and 2 decimal places Information Technology/P1
1.4Button [1.4 Title case Solution 1: Use of the for.. loop Add a space to the end of the sentence Initialise word string Loop
Q2โ Section header โ
2.1SQL statements
2.1.1Button [
2.1.1Free videos] SELECT Title, Duration, UploadDate, CreatorID FROM tblVideos WHERE FreeVideo = True Also ACCEPT
2.1.2Button [2.1.2 Check domain] SELECT CreatorName, Email, Country FROM tblCreators WHERE NOT Email
2.1.3Button [2.1.3 Latest videos] SELECT Top 3 UploadDate, VideoID, Title FROM tblVideos ORDER BY UploadDate DESC
2.1.4Button [
2.1.4Videos per creator] SELECT CreatorID, Count(*\ AS NumberUploaded FROM tblVideos GROUP BY CreatorID HAVING
2.1.5Button [
2.1.5Add new creator] INSERT INTO tblCreators VALUES ("C011", " TRISHKALOM ",
Q2โ Section header โ
2.2Database Manipulation
2.2.1Button [2.2.1 Remove creator] Go to the fi st record in the tblCreators Use a loop to step through tblCreators Test if tblCreators['CreatorName'] = sCreatorName Go to the fi
2.2.2Butt on [2.2.2 Change upload date] tblVideos.Edit; tblVideos ['UploadDate'] := Date tblVideos.Post; Also ACCEPT: DateToStr(Date\
Q3โ Section header โ
3.1.1Constructor method: Heading with two parameter values of type string Assign correct parameter values to fAlbum Title and fArtist Assign
3.1.2get Points function: Function heading with integer return type Points assigned to result
3.1.3updatePoints procedure: Procedure heading with three integer parameters Points album sales
3.1.4setRanking procedure: Procedure heading with integer parameter If iN umWeeks >
3.1.5determineStatus function Test if fH ighRanking = true Test if
Q3โ Section header โ
3.2.1Button [3.2.1 Instantiate album object] Extract album title from combo box Extract artist name from edit box Instantiate the album object: objAlbum:=
3.2.2Button [3.2.2 Calculate p oint s] Call update Point s method Using correct
3.2.3Button [3.2.3 Set ranking] Extract number of weeks from input dialogue box and co vert to integer
3.2.4Button [3.2.4 Display album details Display the information in the rich edit component using the toString method and
Q4โ Section header โ
4.1Button [4.1 Sort] Loop from 1 to length(arrPosition\ Correct nesting Loop from 1 to length(arrPosition\
4.2Button [4.2 New chart] Display the headings (Song, Position and Movement\ in redQ4 File handling AssignFile(tFile, 'Top20.txt'\
Q1โ Section header โ
Q2โ Section header โ
Q3โ Section header โ
Q4โ Section header โ
Q1โ Section header โ
1.1Gender marks // ===================================================================== ====== procedure T frmQuestion1 .btn1_1Click(Sender: TObject\ begin
1.2Random day marks // ===================================================================== ====== procedure T frmQuestion1 .btnQ1_2Click(Sender: TObject\
1.3Calculate marks // ===================================================================== ====== procedure T frmQuestion1 .btnQ1_3Click(Sender: TObject\
1.1end; ShowMessage(FloatToStrF(rBonus,ffCurrency,10, end; Information Technology/P1 13 DBE/May/June 2024 SC/NSC
1.4Title case 13 marks // ===================================================================== ====== procedure TfrmQuestion1.btnQ1_4Click(Sender: TObject\ var K : integer ; sSentence, sWord, sTitleCase : String;
1.4Title case // for loop Solution 1 sSentence := sSentence+' '; sWord := ''; for K := 1 to Length(sSentence\ begin if sSentence[K] <> ' ' then sWord := sWord + sSentence[K]
Q2โ Section header โ
Q2โ Section header โ
2.1.1Free videos marks // ====================================================== ===================== sSQL1 := 'SELECT Title, Duration, UploadDate, CreatorID ' + 'FROM tblVideos ' + 'WHERE FreeVideo = True';
2.1.2Check domain marks // ====================================================== ===================== sSQL2 := 'SELECT CreatorName, Email , Country
2.1.3Latest videos 4 marks // ============================================================================== sSQL3 := 'SELECT Top 3 UploadDate, VideoID, Title ' + 'FROM tblVideos ' +
2.1.4Videos per creator marks // ====================================================== ===================== SQL 4 := 'SELECT CreatorID, ' +
2.1.5Add new creator marks // ====================================================== ===================== sSQL5 := 'I NSERT INTO tblCreators (CreatorID, CreatorName,
2.2.1Remove creator sCreatorName := cmbQ2_2_ .Text; tblCreators.First; while NOT tblCreators.Eof do begin if tblCreators['CreatorName'] = sCreatorName then
2.2.2Change upload date marks // ============================================== ============================= procedure TfrmQuestion2.btnQ2_2_2Click(Sender: TObject\ begin tblVideos.Edit;
Q3โ Section header โ
Q4โ Section header โ
4.1Sort 11 marks // ============================================================================== procedure TfrmQuestion4.btnQ4_1Click(Sender: TObject\ var I, iTemp: integer;
Q4โ Section header โ
4.2New chart 19 marks // ============================================================================== procedure TfrmQuestion4.btnQ4_2Click(Sender: TObject\ var tFile: TextFile; J, iNew: integer; bFound: boolean;
Q4โ Section header โ