Computer Science For First Examination In 2021 9618 · 11

11.2 Constructs

140 questions in this subtopic. Open a question to solve it and check the official answer.

Reset
2023 May-June · Paper 21 · Q8(e)

Constructs · 3 marks · official answer ready

(e) A new module FindItem() searches for a given item in the Stock.txt file, which is already organised in ascending order of ItemNum. Describe how this organisation may improve t…

2023 May-June · Paper 22 · Q1(a)(i)

Constructs · 1 mark · official answer ready

(i) Identify a more appropriate way of representing the postal costs. .............................................................................................................…

2023 May-June · Paper 22 · Q1(b)

Constructs · 3 marks · official answer ready

(b) The lines of pseudocode contain features that make them easier to understand. State three of these features. 1 ................................................................…

2023 May-June · Paper 22 · Q2(b)

Constructs · 2 marks · official answer ready

(b) MyDOB has been assigned a valid value representing the user’s date of birth. Write a pseudocode statement to calculate the number of months from the month of the user’s birth …

2023 May-June · Paper 22 · Q11(d)(i)

Constructs · 10 marks

(i) State three items of information that the new module would need. Justify your choice in each case. Information ................................................................…

2023 May-June · Paper 22 · Q11(d)(ii)

Constructs · 20 marks

(ii) Identify two items of customer information that would not be required by the new module. Justify your choice in each case. Information .......................................…

2023 May-June · Paper 23 · Q2(a)

Constructs · 2 marks · official answer ready

(a) MyDOB has been assigned a valid value corresponding to Kevin’s date of birth. Complete the pseudocode statement to test whether Kevin was born on a Thursday. IF ..............…

2023 May-June · Paper 23 · Q8(a)

Constructs · 8 marks · official answer ready

(a) Write pseudocode for module ChangeSupp(). .....................................................................................................................................…

2023 May-June · Paper 23 · Q8(b)

Constructs · 6 marks · official answer ready

(b) A new module is required: Module Description Report_1() • takes a parameter of type string that represents a SupplierCode • searches the Stock.txt file for each line of item i…

2023 May-June · Paper 23 · Q8(c)(ii)

Constructs · 3 marks · official answer ready

(ii) The algorithm will be modified to produce the report in the new format. The modified algorithm will be implemented so that the file Stock.txt is only read once. Describe the …

2023 May-June · Paper 31 · Q5(b)

Constructs · 4 marks · official answer ready

(b) Give two benefits and two drawbacks of circuit switching. Benefit 1 ...........................................................................................................…

2023 May-June · Paper 31 · Q10

Constructs · 5 marks · official answer ready

10 The pseudocode algorithm shown copies an active accounts text file ActiveFile.txt to an archive accounts text file ArchiveFile.txt, one line at a time. Any blank lines found in…

2023 May-June · Paper 31 · Q11(b)

Constructs · 4 marks · official answer ready

(b) Complete the following pseudocode for the function Dequeue to remove the front item from the queue. FUNCTION Dequeue RETURNS STRING DECLARE Item : STRING .....................…

2023 May-June · Paper 33 · Q5(b)

Constructs · 4 marks · official answer ready

(b) Give two benefits and two drawbacks of circuit switching. Benefit 1 ...........................................................................................................…

2023 May-June · Paper 33 · Q10

Constructs · 5 marks · official answer ready

10 The pseudocode algorithm shown copies an active accounts text file ActiveFile.txt to an archive accounts text file ArchiveFile.txt, one line at a time. Any blank lines found in…

2023 May-June · Paper 33 · Q11(b)

Constructs · 4 marks · official answer ready

(b) Complete the following pseudocode for the function Dequeue to remove the front item from the queue. FUNCTION Dequeue RETURNS STRING DECLARE Item : STRING .....................…

2023 May-June · Paper 41 · Q2(b)(ii)

Constructs · 4 marks · official answer ready

(ii) The Helicopter method IncreaseSpeed() overrides the method from the parent class and: • adds the amount of vertical change to the vertical position • adds IncreaseAmount to t…

2023 May-June · Paper 41 · Q2(c)

Constructs · 3 marks · official answer ready

(c) A procedure needs to output the horizontal position and speed of a vehicle. If the vehicle is a helicopter, it also outputs the vertical position. All outputs must include app…

2023 May-June · Paper 41 · Q3(b)(iii)

Constructs · 5 marks · official answer ready

(iii) The procedure ReadData(): • reads the animal names from the file AnimalData.txt • uses PushAnimal() to insert each name onto the stack • uses appropriate exception handling …

2023 May-June · Paper 41 · Q3(c)

Constructs · 5 marks · official answer ready

(c) The procedure OutputItem(): • pops the next item from both Animal and Colour • outputs the colour and animal on one line, for example "black horse" If there is no data in Colo…