Programming
471 questions. Open a question to solve it and check the official answer.
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…
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…
Programming basics · 2 marks · official answer ready
(iv) Write the simplified sum-of-products expression for your answer to part (a)(iii). X = ........................................................................................…
Programming basics · 3 marks · official answer ready
(a) Give reasons why each of these statements is invalid. X = XY + 21 .............................................................................................................…
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 ::= ..................................................................…
Programming basics · 3 marks · official answer ready
(ii) Give the BNF for the revised variable. .......................................................................................................................................…
Programming basics · 2 marks · official answer ready
(ii) Justify your answer to part (i). ........................................................................................................................................... .…
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…
Programming basics · 2 marks · official answer ready
(iv) Write the simplified sum-of-products expression for your answer to part (a)(iii). X = ........................................................................................…
Programming basics · 3 marks · official answer ready
(a) Give reasons why each of these statements is invalid. X1 = Y - 21 .............................................................................................................…
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 ::= ..................................................................…
Programming basics · 2 marks · official answer ready
(ii) Justify your answer to part (i). ........................................................................................................................................... .…
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…
Programming basics · 2 marks · official answer ready
(iv) Write the simplified sum-of-products expression for your answer to part (a)(iii). X = ........................................................................................…
Programming basics · 3 marks · official answer ready
(a) Give reasons why each of these statements is invalid. X = XY + 21 .............................................................................................................…
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 ::= ..................................................................…
Programming basics · 3 marks · official answer ready
(ii) Give the BNF for the revised variable. .......................................................................................................................................…
Programming basics · 2 marks · official answer ready
(ii) Justify your answer to part (i). ........................................................................................................................................... .…
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…
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…
