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.1Button [1.1 Formatting] Any ONE of font size or style: Set font size of edtQ1_1 to 14 edtQ1_1.Font.Size (1\ := 14 (1\
1.2Button [1.2 Random number] Generate a random number in the correct range (1 to 99\ Check if random number is a single digit (< 9\
1.3Button [1.3 Area] Extract from edtQ1_3 converted to integer/ float area
1.4Button [1.4 Find] Extract sW ord from edtQ1_4.text Create and initialise counter
1.5Button [1.5 Booster rocket] Create and initialise counter Get total fuel from input box converted to integer/real Loop while total fuel 200
Q2โ Section header โ
2.1SQL statements
2.1.1Button [2.1.1 iOS products] SELECT DeviceID, Devic eName FROM tblDevices WHERE
2.1.2Button [2.1.2 Category selected SELECT DeviceName, Category, NumInStock FROM tblDevices WHERE Category LIKE
2.1.3Button [2.1.3 Online support SELECT DeviceName, Category, OperatingSystem FROM tblDevices D, tblManufacturers M WHERE D.ManufacturerID = M.ManufacturerID AND
2.1.4Button [2.1.4 Profit per manufacturer] SELECT Manufacturer ID FORMAT(SUM (NumInStock * Price * 0.6\
2.1.5Button [2.1.5 Remove devices] Delete FROM tbl Devices WHERE Category = "Smart speaker" AND Manufacturer
Q2โ Section header โ
2.2Database Manipulation
2.2.1Button [2.2.1 Display products] Go to the fi st record in the tblManufacturers Use a loop to step through tblManufacturers Display the ManufacturerNam
2.2.2Button [2.2.2 Update stock] Extract iNumSold from input dialog box converted to integer Test if tblDevices ['NumInStock'] >
Q3โ Section header โ
3.1.1Constructor Create: Header with parameter values and correct data types Assign correct parameters to
3.1.2Function getSwitchID with the string return type Result := fSwitchID
3.1.3Function energyUsed with real return type Function with correct return type and correct parameter Result = fPowerUsage
3.1.4Procedure setSwitchStatus Correct heading with Boolean parameter Set the fSwitchStatus attribute to the parameter value
3.1.5Function toString with string return type Result with c orrect labels and correct attribute names Call the determineSwitchStatus method Correct formatting Subtotal: Object class
Q3โ Section header โ
3.2.1Button [3.2.1 Instantiate object] Extract the switchID from the combobox Extract the selected device from the listbox sLine := lstQ3_2_1.Items[lst Q3_2_1.ItemIndex] Extract the device
3.2.2Button [3.2.2 Change switch status] Use ItemIndex from the radio group with if or case call
3.2.3Button [3.2.3 Write to file] AssignFile(tFile, 'log.txt'\ and Append(tFile\ Writeln(tFile, DateToStr( Date
3.2.4Button [3.2.4 Power usage] Extract hours from edtQ3_2_4 and convert to an integer Use the objSmartSwitch. energyUsed method
Q4โ Section header โ
4.1Button [4.1 Display] Clear redQ4 Add heading and column numbers Loop Row from 1 to 5 Initialise
4.2Button [4.2 Add access point] Extract the iRow and iCol from the spin edits Initialise counter Loop
4.3Button [4.3 Coverage Loop through rows iRow from 1 to Loop through columns iCol from 1 to
Q1โ Section header โ
Q2โ Section header โ
Q3โ Section header โ
Q4โ Section header โ
Q1โ Section header โ
1.3Area 8 marks // ============================================================= procedure TfrmQuestion1.btnQ1_3Click(Sender: TObject\ var , rArea: real; const pi: real = 22 / 7;
1.4Find 11 marks // ============================================================= procedure TfrmQuestion1.btn1_4Click(Sender: TObject\ var tFile: textfile; sLine, sWord: String; iCount: integer;
1.5Booster rocket 9 marks // ============================================================= procedure TfrmQuestion1.btnQ1_5Click(Sender: TObject\ var rTotalFuel, rFuel: real; iCounter: integer; begin
1.5Booster rocket rTotalFuel := StrToFloat(inputbox('Fuel', 'Total litres of fuel: ', '550'\ iCounter := 0; while rTotalFuel > 200 do begin
2.1.2Category selected marks //====================================================================== sSQL2 := 'SELECT DeviceName, Category, NumInStock ' + 'FROM tblDevices ' + 'WHE RE Category LIKE "%' + sDeviceType
2.1.3Online support marks //====================================================================== sSQL 3 : = 'SELECT DeviceName, Category, OperatingSystem ' + 'FROM tblDevices D, tblManufacturers M ' + 'WHERE D.ManufacturerID = M.ManufacturerID
2.1.4Profit per manufacturer marks //====================================================================== SQL4 := 'SELECT ManufacturerID , ' + 'FORMAT(SUM(NumInStock * (Price * 0.6\ 'AS Profit ' + 'FROM tblDevices
2.1.5Remove devices marks //======================================================================= sSQL5 := 'Delete FROM tblDevices ' + 'WHERE Category = "Smart speaker" ' + 'AND Manufacturer ID = "M
Q2โ Section header โ
Q2โ Section header โ
Q3โ Section header โ
3.1.1Constructor marks // ===================================================================== constructor TSmartSwitch.create(sSwitchID: String; sDevice: String; iPowerUs age: Integer\ begin fSwitchID := sSwitchID;
3.1.2getSwitchID marks // ===================================================================== function TSmartSwitch.getSwitchID: String; begin Result := fSwitchID; end; // =====================================================================
3.1.3energyUsed 4 marks // ===================================================================== function TSmartSwitch.energyUsed(iHours: Integer\ begin Result := fPowerUsage * iHours / 1000; end; // =====================================================================
3.1.4setSwitchStatus 3 marks // ===================================================================== procedure TSmartSwitch.setSwitchStatus(bStatus: Boolean\ begin fSwitchStatus := bStatus; end; // =====================================================================
3.1.5toString 4 marks // ===================================================================== function TSmartSwitch.toString: String; begin Result := 'Switch ID: ' + fSwitchID + #13 + 'Device: ' + fDevice + #13 +
3.2.1Instantiate object 8 marks // ===================================================================== procedure TfrmQuestion3.btnQ3_2_1Click(Sender: TObject\ Var sLine, sDevice:String; iWatt:Integer; begin
3.2.2Change switch status 5 marks // ===================================================================== procedure TfrmQuestion3.btnQ3_2_2Click(Sender: TObject\ begin re dQ3.Lines.Clear; case rgpQ3_2_2.ItemIndex of
3.2.3Write to file 6 marks // ===================================================================== procedure TfrmQuestion3.Button1Click(Sender: TObject\ var tFile : te xtFile; begin AssignFile(tFile, 'log.txt'\
3.2.4Power usage 3 marks // ===================================================================== procedure TfrmQuestion3.btnQ3_2_4Click(Sender: TObject\ var iHours : I nteger; rEnergy:Real; begin
Q4โ Section header โ
4.1Display 7 m arks // ===================================================================== procedure TfrmQuestion .btnQ4_1Click(Sender: TObject\ var
4.2Add access point 10 m arks // ===================================================================== procedure TfrmQuestion .btnQ4_2Click(Sender: TObject\ var I, iCounter, iRow, iCol: Integer;
4.3Coverage 13 m arks // ===================================================================== procedure TfrmQuestion .btnQ4_3Click(Sender: TObject\ var I: Integer;