Computer Science 9608 · 11

Programming

471 questions. Open a question to solve it and check the official answer.

Reset
2021 May-June · Paper 23 · Q6(b)

Structured programming · 16 marks · official answer ready

(b) Write program code for a module GroupReport(), which will summarise the stock data for a given product group. The product group will be passed to the module as a string. The t…

2021 May-June · Paper 31 · Q4(a)(iii)

Programming basics · 2 marks · official answer ready

(iii) The K-map can be used to simplify the expression in part (a)(i). Draw loops around appropriate groups of 1s in the table in part (a)(ii) to produce an optimal sum-of-product…

2021 May-June · Paper 31 · Q4(a)(iv)

Programming basics · 2 marks · official answer ready

(iv) Write the simplified sum-of-products expression for your answer to part (a)(iii). X = ........................................................................................…

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

Programming basics · 3 marks · official answer ready

(a) Give reasons why each of these statements is invalid. X = XY + 21 .............................................................................................................…

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

Programming basics · 5 marks · official answer ready

(b) Complete the Backus-Naur Form (BNF) for the syntax diagrams shown. has been completed for you. ::= X|Y|Z ::= ..................................................................…

2021 May-June · Paper 31 · Q5(c)(ii)

Programming basics · 3 marks · official answer ready

(ii) Give the BNF for the revised variable. .......................................................................................................................................…

2021 May-June · Paper 31 · Q7(a)(ii)

Programming basics · 2 marks · official answer ready

(ii) Justify your answer to part (i). ........................................................................................................................................... .…

2021 May-June · Paper 32 · Q4(a)(iii)

Programming basics · 2 marks · official answer ready

(iii) The K-map can be used to simplify the expression in part (a)(i). Draw loops around appropriate groups of 1s in the table in part (a)(ii) to produce an optimal sum-of-product…

2021 May-June · Paper 32 · Q4(a)(iv)

Programming basics · 2 marks · official answer ready

(iv) Write the simplified sum-of-products expression for your answer to part (a)(iii). X = ........................................................................................…

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

Programming basics · 3 marks · official answer ready

(a) Give reasons why each of these statements is invalid. X1 = Y - 21 .............................................................................................................…

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

Programming basics · 5 marks · official answer ready

(b) Complete the Backus-Naur Form (BNF) for the syntax diagrams shown. has been completed for you. ::= X|Y|Z ::= ..................................................................…

2021 May-June · Paper 32 · Q8(a)(ii)

Programming basics · 2 marks · official answer ready

(ii) Justify your answer to part (i). ........................................................................................................................................... .…

2021 May-June · Paper 33 · Q4(a)(iii)

Programming basics · 2 marks · official answer ready

(iii) The K-map can be used to simplify the expression in part (a)(i). Draw loops around appropriate groups of 1s in the table in part (a)(ii) to produce an optimal sum-of-product…

2021 May-June · Paper 33 · Q4(a)(iv)

Programming basics · 2 marks · official answer ready

(iv) Write the simplified sum-of-products expression for your answer to part (a)(iii). X = ........................................................................................…

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

Programming basics · 3 marks · official answer ready

(a) Give reasons why each of these statements is invalid. X = XY + 21 .............................................................................................................…

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

Programming basics · 5 marks · official answer ready

(b) Complete the Backus-Naur Form (BNF) for the syntax diagrams shown. has been completed for you. ::= X|Y|Z ::= ..................................................................…

2021 May-June · Paper 33 · Q5(c)(ii)

Programming basics · 3 marks · official answer ready

(ii) Give the BNF for the revised variable. .......................................................................................................................................…

2021 May-June · Paper 33 · Q7(a)(ii)

Programming basics · 2 marks · official answer ready

(ii) Justify your answer to part (i). ........................................................................................................................................... .…

2021 May-June · Paper 41 · Q1(a)

Constructs · 5 marks · official answer ready

(a) The state-transition diagram shows the different states of the vending machine. Complete the state-transition diagram. .......................... Total the money Cancel insert…

2021 May-June · Paper 41 · Q2(b)(iii)

Structured programming · 5 marks · official answer ready

(iii) The function, getCustomer(): • takes the customer ID as a parameter • passes the customer ID to the function getRecordLocation(), which returns the calculated hash value • r…