11.2 Constructs
140 questions in this subtopic. Open a question to solve it and check the official answer.
Constructs · 2 marks · official answer ready
8 (a) Describe what is meant by multi-tasking and how it benefits process management. .............................................................................................…
Constructs · 4 marks · official answer ready
(b) Explain the function of the shortest remaining time scheduling routine and give a benefit of this routine. Function ...........................................................…
Constructs · 4 marks · official answer ready
(a) Write pseudocode statements to declare the composite data type VideoLibrary to hold data about each video in the collection. This data includes: • identity code (any combinati…
Constructs · 2 marks · official answer ready
(c) Describe two ways in which the performance of a sort routine is affected by the data to be sorted. 1 ..........................................................................…
Constructs · 1 mark · official answer ready
(ii) Test your program. Take a screenshot of the output(s). Save your program. Copy and paste the screenshot into part 3(e)(ii) in the evidence document. [1] 10 11 12 Permission t…
Constructs · 4 marks · official answer ready
(c) The function Pop() returns the next item from the stack. The function returns "–1" if the stack is empty. Write program code for Pop() Save your program. Copy and paste the pr…
Constructs · 0 marks · official answer ready
(e) The values stored in the stack are used to perform mathematical operations. A total is initialised to the first value in the stack. The first value in the stack will always be…
Constructs · 2 marks · official answer ready
(iii) Test your program. Take a screenshot of the output(s). Save your program. Copy and paste the screenshot into part 3(d)(iii) in the evidence document. [2] Permission to repro…
Constructs · 6 marks · official answer ready
(d) The text file QueueData.txt stores positive integers. Each integer is on a new line in the file. The procedure CreateQueue(): • opens the file QueueData.txt • reads in each li…
Constructs · 2 marks · official answer ready
(ii) Test your program. Take a screenshot of the output(s). Save your program. Copy and paste the screenshot into part 3(c)(ii) in the evidence document. [2] 11 12 Permission to r…
Constructs · 2 marks · official answer ready
(b) Identify two differences between general purpose registers and special purpose registers. 1 ...................................................................................…
Constructs · 2 marks · official answer ready
(a) The pseudocode contains a logical error. Identify the error and suggest a correction. Error ...................................................................................…
Constructs · 1 mark · official answer ready
(i) Identify a more appropriate way of representing the tax rate values in the final program. .....................................................................................…
Constructs · 3 marks · official answer ready
(ii) Describe the benefits of your answer to part (b)(i) with reference to this program. ..........................................................................................…
Constructs · 2 marks · official answer ready
(c) Give the appropriate data type for the variables in the following table, as used in the pseudocode: Variable name Data type HighRate TaxPayable [2]
Constructs · 1 mark · official answer ready
(d) The final CASE condition (> 200) in the pseudocode example could be replaced with a keyword. Give the keyword. ................................................................…
Constructs · 2 marks · official answer ready
(a) An algorithm uses the array DaysInMonth to calculate a ‘use-by’ date. An alternative design would involve the use of multiple selection statements. An array-based technique is…
Constructs · 16 marks · official answer ready
(c) The requirement changes. Instead of a new file, the module described in part (b) needs to add the corresponding candidate ID for each paper that needs to be checked to an exis…
Constructs · 3 marks · official answer ready
(a) Run-time errors can be generated in different ways. For example, a run-time error will be generated if a function is called with invalid parameters. The pseudocode contains th…
Constructs · 2 marks · official answer ready
(c) The function Process() contains a selection construct using a CASE structure. Write pseudocode using a single selection construct with the same functionality without using a C…
