11.2 Constructs
140 questions in this subtopic. Open a question to solve it and check the official answer.
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…
Constructs · 1 mark · official answer ready
(i) Identify a more appropriate way of representing the postal costs. .............................................................................................................…
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 ................................................................…
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 …
Constructs · 10 marks
(i) State three items of information that the new module would need. Justify your choice in each case. Information ................................................................…
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 .......................................…
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 ..............…
Constructs · 8 marks · official answer ready
(a) Write pseudocode for module ChangeSupp(). .....................................................................................................................................…
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…
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 …
Constructs · 4 marks · official answer ready
(b) Give two benefits and two drawbacks of circuit switching. Benefit 1 ...........................................................................................................…
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…
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 .....................…
Constructs · 4 marks · official answer ready
(b) Give two benefits and two drawbacks of circuit switching. Benefit 1 ...........................................................................................................…
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…
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 .....................…
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…
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…
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 …
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…
