Time allowed: 1 hour 30 minutes
(a) Define Abstraction and provide an example related to a map app.
(b) Explain one benefit of using Decomposition in a large project.
(c) Compare High-Level and Low-Level languages.
(a) Complete the trace table for the nested loop algorithm.
| Iteration | x | y |
|---|---|---|
(b) Draw a logic circuit and truth table for: P = (NOT A) AND (B OR C).
(a) Explain the difference between DIV and MOD using 17 and 5.
(b) Define Casting and provide a pseudocode example.
(c) Explain the difference between Global and Local variables.
(d) Identify two characteristics of an IDE that aid debugging.
(a) Describe the steps of a Binary Search and its pre-condition.
(b) Show the first pass of a Bubble Sort for [8, 3, 5, 2].
(c) Compare a Syntax Error and a Logic Error.
(a) Write an SQL query to find 'Tripped' alarms in 'Logs'.
(b) Write an algorithm to find the highest temp in a 1D array.
(a) Write an algorithm using a DO UNTIL loop to validate a 4-digit PIN.
(b) Explain why DO UNTIL is suitable for user login.
(a) Write an algorithm to check a 2D array sensorGrid for values > 40.
(b) Purpose of Boolean in this grid check.
(a) Write a Function that uses newFile() to create status.txt.
(b) Difference between a Parameter and an Argument.