Computer Science 9608 · 11

11.2 Constructs

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

Reset
2017 May-June · Paper 11 · Q38

Constructs · 9 marks

38 15 (i) The developer has used three variables in the JavaScript code. State the identifiers used. 1 .................................................................. 2 .......…

2017 May-June · Paper 12 · Q4(b)(iv)

Constructs · 1 mark · official answer ready

(iv) The user clicked on an attachment in an unsolicited email. Since then, the computer has shown some unexplained behaviours. Utility software solution: ........................…

2017 May-June · Paper 12 · Q6(c)(iii)

Constructs · 1 mark · official answer ready

(iii) The JavaScript code uses a selection statement. State the line number which contains its condition. Line number: .................................... [1]

2017 May-June · Paper 12 · Q6(c)(v)

Constructs · 4 marks · official answer ready

(v) Name and describe two other types of validation check which could be appropriate for this data capture form. Validation check: ................................................…

2017 May-June · Paper 12 · Q40

Constructs · 9 marks

40 13 (i) The developer has used three variables in the JavaScript code. State the identifiers used. 1. .................................... 2. ...................................…

2017 May-June · Paper 13 · Q11

Constructs · 9 marks · official answer ready

11 if (x == "") 12 { 13 alert(Message1) 14 } 15 else 16 { 17 alert(Message2) 18 } 19 } 20 21 22 23 24 25 Product code: 26 27 Number: 28 29 30 Submit order: 31 34 35 36 37 38 15 (i…

2017 May-June · Paper 13 · Q38

Constructs · 9 marks

38 15 (i) The developer has used three variables in the JavaScript code. State the identifiers used. 1 .................................................................. 2 .......…

2017 May-June · Paper 21 · Q3

Constructs · 11 marks · official answer ready

3 A string conversion function, StringClean, is to be written. This function will form a new string, OutString, from a given string, InString, by: • removing all non-alphabetic ch…

2017 May-June · Paper 21 · Q6(a)

Constructs · 10 marks · official answer ready

(a) Write program code to implement the new function ValidatePassword. Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should sho…

2017 May-June · Paper 21 · Q6(b)(i)

Constructs · 5 marks · official answer ready

(i) The function will be tested. Give a valid string to check that the function returns TRUE under the correct conditions. String1: ...............................................…

2017 May-June · Paper 22 · Q4(c)

Constructs · 42 marks

(c) The file may not contain an entry for every user. If the user ID is not found, then the name “Guest” should be used as the preferred name. Use structured English to write a mo…

2017 May-June · Paper 22 · Q6(a)

Constructs · 9 marks · official answer ready

(a) Write program code to implement the new function, ValidateRegistration. Visual Basic and Pascal: You should include the declaration statements for variables. Python: You shoul…

2017 May-June · Paper 23 · Q3

Constructs · 11 marks · official answer ready

3 A string conversion function, StringClean, is to be written. This function will form a new string, OutString, from a given string, InString, by: • removing all non-alphabetic ch…

2017 May-June · Paper 23 · Q6(a)

Constructs · 10 marks · official answer ready

(a) Write program code to implement the new function ValidatePassword. Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should sho…

2017 May-June · Paper 23 · Q6(b)(i)

Constructs · 5 marks · official answer ready

(i) The function will be tested. Give a valid string to check that the function returns TRUE under the correct conditions. String1: ...............................................…

2017 May-June · Paper 31 · Q4(b)(iii)

Constructs · 4 marks · official answer ready

(iii) A procedure is written to insert a new record into the file. Complete the algorithm for this procedure. PROCEDURE InsertRecord(CustomerID : INTEGER) RecordKey CustomerID MOD…

2017 May-June · Paper 32 · Q6(b)(i)

Constructs · 3 marks · official answer ready

(i) Complete the following pseudocode algorithm for the routine. 01 ForEver .......................................................................................................…

2017 May-June · Paper 32 · Q6(c)(ii)

Constructs · 2 marks · official answer ready

(ii) Explain what happens at step 4. ........................................................................................................................................... ..…

2017 May-June · Paper 33 · Q4(b)(iii)

Constructs · 4 marks · official answer ready

(iii) A procedure is written to insert a new record into the file. Complete the algorithm for this procedure. PROCEDURE InsertRecord(CustomerID : INTEGER) RecordKey CustomerID MOD…

2017 May-June · Paper 41 · Q2(b)(i)

Constructs · 9 marks · official answer ready

(i) The procedure, InsertRecord, takes as a parameter the customer record to be inserted into the hash table. The procedure makes use of the function Hash. Collisions will be mana…