computing 2026 hci prelim p1 qn
Uploaded by ChthonicCream · 17 October 2026
Preview
Text from the first pagesPage 1 of 8 HWA CHONG INSTITUTION C2 PRELIMINARY EXAMINATION 2026 COMPUTING Higher 2 14 Sept 2026 Paper 1 (9569 / 01) 1400 -- 1700 hrs READ THESE INSTRUCTIONS FIRST An answer booklet will be provided with this question paper. You should follow the instructions on the front cover of the answer booklet. Answer ALL questions. Approved calculators are allowed. The number of marks is given in brackets [ ] at the end of each question or part question. The total number of marks for this paper is 100. This document consists of 8 printed pages.
Page 2 of 8 1 Bobby sent a message to Charles over a network using a network application. A digital signature is sent with the message. (a) Give two purposes of using digital signature. [2] (b) Explain how Bobby’s network application creates a digital signature. [2] (c) Explain how the digital signature is authenticated by Charles’s network application. [3] 2 Data communication networks rely on various technologies, architectures, and protocols to enable efficient communication between devices. (a) Give two advantages and one disadvantage of packet switching over circuit switching. [3] (b) State one reason for using a checksum and give one example of an error that checksum cannot detect. [2] (c) Switches and routers are common devices used in networking. Explain two differences between a switch and a router. [2] (d) A local area network (LAN) can be setup as either client-server or peer-to-peer. Give two advantages and one disadvantage in storing shared data on a client -server network rather than on a peer-to-peer network. [3] (e) Explain how a Denial of Service (DOS) attack can compromise an internal server and suggest one protection scheme to detect a DOS attack. [3]
Page 3 of 8 3 A warehouse has three storage bays, numbered 1, 2 and 3. Containers are stacked vertically in each bay. A program uses the Transfer procedure to simulate the moving of containers from one storage bay to another, with only one container moved at a time and the containers maintaining the same stacking order after the transfer. PROCEDURE Transfer(level, source, destination) IF level = 1 THEN OUTPUT("Move container from ",source," to ",destination) ELSE Transfer(level - 1, source, 6 - source - destination) OUTPUT("Move container from ",source," to ",destination) Transfer(level - 1, 6 - source - destination, destination) ENDIF ENDPROCEDURE (a) Show the sequence of output statements produced when three containers are transferred from Bay 1 to Bay 3 using the procedure Transfer(3, 1, 3). [3] (b) Assuming that each procedure call pushes its parameters onto a run -time stack. Show the content of the stack, excluding the return address, after each of the first five procedure calls. [3] (c) Explain one difference between an iterative and a recursive solution to a problem. [2] (d) A recursive procedure may call itself several times before any of the earlier calls have completed. Explain why the parameters and local variables of each procedure call are stored on a run-time stack rather than in the same memory locations. [2] 4 The class PeriodicTable stores chemical elements in a binary search tree (BST). Each node in the binary search tree is represented by an object of the class ElementNode. An ElementNode class is defined as follows: Attribute Data Type Description atomic INTEGER Stores the atomic number of the element symbol STRING Stores the chemical symbol of the element left ElementNode Reference to the left child node, or NULL if there is no left child. right ElementNode Reference to the right child node, or NULL if there is no right child.
Page 4 of 8 The binary search tree is ordered using the atomic number of each element, with elements of smaller atomic numbers stored to the left and elements of larger atomic numbers stored to the right. The attribute root stores a reference to the root node of the binary search tree. The following elements are inserted into an initially empty binary search tree in the order shown: Element Symbol Atomic Number Iron Fe 26 Gold Au 79 Sodium Na 11 Uranium U 92 Hydrogen H 1 Oxygen O 8 Silver Ag 47 (a) Draw the binary search tree after all the above elements have been inserted into the initially empty binary search tree in the order given. [4] (b) Write pseudocode for the procedure Insert(newNode) in the PeriodicTable class. The method should: • use an iterative loop to traverse the tree • insert the node into the correct position in the binary search tree. [7] (c) Write a recursive function, in pseudocode, TotalAtomicNumber(node)that returns the sum of the atomic numbers of all elements in the subtree rooted at node. [3] (d) A user wishes to efficiently search for an element using its chemical symbol instead. Explain why the existing binary search tree cannot be used efficiently for this purpose and suggest how the binary search tree should be modified to support efficient searches by chemical symbol. [2]
Page 5 of 8 5 The National Parks Board supports community gardening groups across Singapore. Each gardening organisation manages a community garden, where members grow and harvest different crops. The gardening organisation records the following data for each garden: • garden ID • garden name • zone • address The organisation records the following data for each member: • member ID • member name • contact number • email address The organisation records the following data for each crop: • crop ID • crop name • crop category Gardening sessions are held at community gardens. The organisation records the following data for each gardening session: • session ID • date of session • community garden where the session is held • member participating in the session Each gardening session involves one member and is held at one community garden. A member may participate in many gardening sessions, and each community garden may hold many gardening sessions. During each gardening session, one or more crops may be harvest ed, and each crop may be harvested during many gardening sessions. The harvest weight in kilograms is recorded for each crop harvested during a gardening session. (a) Draw an entity-relationship (E-R) diagram to show the tables in third normal form (3NF) and the relationship(s) between them. [5] (b) State what is meant by composite key. [1]
Page 6 of 8 (c) A table description can be expressed as TableName(Attribute1, Attribute2, Attribute3, ...) The primary key is indicated by underlining one or more attributes. Foreign keys are indicated using a dashed underline. Write the table descriptions for the tables obtained in part (a). [7] (d) Write an SQL query to display the date, member name and garden name for all gardening sessions held at community gardens in the "West4" zone. [4] (e) Write an SQL query to display the name of each community garden and the total harvest weight of all crops harvested at each community garden, labelled TotalHarvestWeight. Only include community gardens with TotalHarvestWeight of at least 100 kg and arrange the output in descending order of TotalHarvestWeight. [7] 6 (a) Explain how a merge sort algorithm will sort the data in a list into ascending order. [3] (b) Describe the steps in a bubble sort algorithm. [2] (c) Using Big-O notation, state the worst-case time complexity of merge sort and bubble sort algorithms. Describe a scenario when bubble
Content continues in the PDF. Download PDF
Related notes
- computing 2026 jpjc prelim p1 ansExam Papers · 2026
- computing 2026 hci prelim p2 qnExam Papers · 2026
- computing 2026 dhs prelim p2 qnExam Papers · 2026
- computing 2026 dhs prelim p1 qnExam Papers · 2026
- computing 2026 asrjc prelim p2 qnExam Papers · 2026
- computing 2026 asrjc prelim p1 qnExam Papers · 2026
- computing 2026 acjc prelim p2 qnExam Papers · 2026
- computing 2026 acjc prelim p1 qnExam Papers · 2026
- NYJC 2026 Prelim P2Exam Papers · 2026
- NYJC 2026 Prelim P1Exam Papers · 2026
- DHS 2026 Y6 H2 Computing Prelim Paper 2_finalExam Papers · 2026
- ACJC 2026 JC2 Computing Prelim Paper 2 (Practical)Exam Papers · 2026
- See all H2 Computing notes

