| Q | Answer/Indicative Content | Marks |
|---|---|---|
| 1.1 | Abstraction: Removing unnecessary details to focus on the essential features (2). Decomposition: Breaking a complex problem down into smaller, more manageable parts (2). |
4 |
| 1.2 | Inputs: Current temperature, Target temperature (2). Process: Comparing current vs target temp (1). Output: Signal to turn heater ON/OFF (1). |
4 |
| 2.1 | Illustration of a pass: Correct swaps identified (3), correct final state of the pass (3). | 6 |
| 2.2 | Correct truth table columns for logic circuit inputs/outputs (4). Correct logic behavior (2). | 6 |
| 3.1 | Misuse: SQL Injection: Entering malicious SQL code into an input field (2). Sanitization: Removing dangerous characters from inputs before processing (3). |
5 |
| 3.2 | Find errors early (1), save time/money (1), ensure code meets requirements (1). | 3 |
| 3.3 | Iterative: Done during development, testing modules in isolation (3). Final: Done when code is complete, testing the whole system (3). Comparison point (1). |
7 |
| 4.1 | Identification of Sequence (2), Selection (2), Iteration (2). | 6 |
| 4.2 | Integer (Whole number), Real (Decimal), Boolean (True/False), String (Text). (1 mark each). | 4 |
| 4.3 | Record Structure: StudentRecord (1). Fields: Name:String (1), ID:Integer (1), Grade:Character (2). | 5 |
| 5 | Refining: Identification of 3 errors (e.g. incorrect comparison, infinite loop, missing input) (6 marks). Rewrite of algorithm correctly (9 marks). | 15 |
| 6 | Algorithm: - Array initialization (2) - Loop for 10 entries (2) - Input validation (e.g. range check) (4) - Accumulating total (2) - Calculating average correctly (3) - Correct output (2) |
15 |