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
2021 October-November · Paper 21 · Q5(b)

Constructs · 7 marks · official answer ready

5 [4] (b) A program module controls the heaters. This module operates as follows: • If the temperature is below 10, switch the heaters on. • If the temperature is above 20, switch…

2021 October-November · Paper 21 · Q6(b)

Constructs · 8 marks · official answer ready

(b) The module description of SearchInRow() is provided here for reference. Module Description • Takes two parameters of type INTEGER: ◦ a row number ◦ a start column (1 or 1280) …

2021 October-November · Paper 22 · Q2(b)(i)

Constructs · 8 marks · official answer ready

(i) Identify a life cycle method that would be appropriate in this case. Give a reason for your choice. Life cycle method .........................................................…

2021 October-November · Paper 22 · Q6(d)

Constructs · 6 marks · official answer ready

(d) An additional module GetCentre() is defined as follows: Module Description • Calculates the coordinates of the centre point • Uses the four modules: FirstRowSet(), LastRowSet(…

2021 October-November · Paper 41 · Q3(a)

Constructs · 10 marks · official answer ready

(a) The 2D array, ArrayNodes, is declared with space for 20 nodes. Each node has a left pointer, data and right pointer. The program also initialises the: • RootPointer to -1 (nul…

2021 October-November · Paper 41 · Q4(e)(ii)

Constructs · 2 marks

4 Take a screenshot to show the output after the given data are entered. Copy and paste the screenshot into part 3(d)(ii) in the evidence document. [1] 11 (e) An in-order tree tra…

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

Constructs · 5 marks · official answer ready

2 (a) Four program modules form part of a program for a library. A description of the relationship between the modules is summarised as follows: Module name Description UpdateLoan…

2021 May-June · Paper 23 · Q7(a)

Constructs · 7 marks · official answer ready

(a) Write pseudocode for the module GetStart(). ...................................................................................................................................…

2021 May-June · Paper 23 · Q7(c)

Constructs · 5 marks · official answer ready

(c) As a reminder, the module description of GetWord() is repeated: Module Description • Called with a parameter representing the position of the first character of a word in FNSt…

2021 May-June · Paper 31 · Q3(b)

Constructs · 4 marks · official answer ready

(b) Explain how an interpreter executes a program without producing a complete translated version of it. ..........................................................................…

2021 May-June · Paper 31 · Q9(a)

Constructs · 2 marks · official answer ready

9 (a) Describe what is meant by an imperative (procedural) programming language. ..................................................................................................…

2021 May-June · Paper 31 · Q9(c)

Constructs · 4 marks · official answer ready

(c) Identify the programming paradigm for each of these program code examples. Program code example Programming paradigm male(john). female(ethel). parent(john, ethel). FOR Counte…

2021 May-June · Paper 32 · Q3(b)

Constructs · 4 marks · official answer ready

(b) Explain how an interpreter executes a program without producing a complete translated version of it. ..........................................................................…

2021 May-June · Paper 32 · Q9(a)

Constructs · 2 marks · official answer ready

9 (a) Describe what is meant by an imperative (procedural) programming language. ..................................................................................................…

2021 May-June · Paper 32 · Q9(c)

Constructs · 4 marks · official answer ready

(c) Identify the programming paradigm for each of these program code examples. Program code example Programming paradigm male(john). female(ethel). parent(john, ethel). FOR Counte…

2021 May-June · Paper 33 · Q3(b)

Constructs · 4 marks · official answer ready

(b) Explain how an interpreter executes a program without producing a complete translated version of it. ..........................................................................…

2021 May-June · Paper 33 · Q9(a)

Constructs · 2 marks · official answer ready

9 (a) Describe what is meant by an imperative (procedural) programming language. ..................................................................................................…

2021 May-June · Paper 33 · Q9(c)

Constructs · 4 marks · official answer ready

(c) Identify the programming paradigm for each of these program code examples. Program code example Programming paradigm male(john). female(ethel). parent(john, ethel). FOR Counte…

2021 May-June · Paper 42 · Q4(c)(iv)

Constructs · 15 marks

4 answer 10 points Write program code for the procedure, readData() to: • read each question, answer and points from the text file • create an object of type TreasureChest for eac…

2021 May-June · Paper 43 · Q4(c)(iv)

Constructs · 15 marks

4 answer 10 points Write program code for the procedure, readData() to: • read each question, answer and points from the text file • create an object of type TreasureChest for eac…