2025 TJC H2 Computing Prelims P1
Uploaded by Randomguy123456788 · 28 September 2025
Preview
Text from the first pages© TJC 2025 [Turn over TEMASEK JUNIOR COLLEGE 2025 JC2 PRELIMINARY EXAMINATION Higher 2 COMPUTING 9569/01 Paper 1 Written 17th September 2025 3 hours 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. If you need additional answer paper ask the invigilator for a continuation 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 7 printed pages and 1 blank page.
2 9569/01/2025 1 An ISBN is an International Standard Book Number and is a unique identifier for each book. Each ISBN consists of 13 digits, which is made up of 5 elements with each element being separated by spaces or hyphens. Three of the five elements may be of varying length: Prefix element – currently this can only be either 978 or 979. It is always 3 digits in length Registration group element – this identifies the country, geographical region, or language area participating in the ISBN system. This element may be between 1 and 5 digits in length Registrant element – this identifies the publisher or imprint. This may be up to 7 digits in length Publication element – this identifies the edition and format of a specific title. This may be up to 6 digits in length Check digit – this is always the final single digit that mathematically validates the rest of the number. It is calculated using a Modulus 10 system with alternate weights of 1 and 3. An example of an ISBN with check digit 5 is shown below: (a) Describe a purpose of the check digit in an ISBN. [2] (b) Suggest another suitable validation technique for ISBN. [1] A school library system needs to store and search for information about books using their unique ISBNs. New books are added into the library inventory and damaged or older books are condemned from time to time. The developers propose the use of a hash table to store and retrieve the book records. (c) Explain how the library system would use a hash function and a hash table to store and search for books by their ISBNs. [3] (d) Give three features of an effective hashing algorithm. [3] (e) Explain the meaning of a collision in this context. [2] (f) Describe one method that can be used to handle the consequence of a collision. [2] Students on an internship with the library ask their developer mentors why the book records, ordered by their ISBNs, were not stored in a linked list instead. (g) Describe one disadvantage of storing and searching the records ordered by ISBNs using a linked list. [2] 978 - 92 - 95055 - 02 - 5 Prefix Registration group Registrant Publication Check digit
3 9569/01/2025 [Turn over 2 A program implements a Merge Sort algorithm to order values into ascending order. The contents of an array are shown: 12 10 5 1 24 9 6 (a) Explain how the Merge Sort algorithm sorts the data in the array into ascending order. [3] (b) Using Big-O notation, state the worst-case time complexity of Merge Sort. [1] (c) The Merge Sort algorithm uses recursion. (i) State three features of a successful recursive function. [3] (ii) State the purpose of the given pseudocode function: FUNCTION iterative (string1) left = 1 right = LENGTH(string1) WHILE left < right IF string1[left] <> string1[right] RETURN FALSE END IF left = left + 1 right = right - 1 END WHILE RETURN TRUE END FUNCTION [1] (iii) Rewrite the pseudocode function in (c)(ii) using recursion. [3]
4 9569/01/2025 3 A software company is writing a program for a vehicle hire business. Both cars and vans are available for hire. For all vehicles, the data that will be stored include: Vehicle Registration Number (VRN) Total distance travelled (km) Date hired Date of return Cost per day Availability for hire For cars, the additional data stored include: Fuel type (petrol, diesel, electric, hybrid) For vans, the additional data stored include: Maximum load (kg) The odometer in the vehicle displays the total distance the vehicle has travelled since manufacture. When a vehicle is hired: ● total distance travelled is set to the odometer's value ● date hired is set to the current date ● date of return is set to the date the vehicle is expected to be returned ● availability for hire is set to FALSE. When a vehicle is returned: ● hire cost is returned as the cost per day multiplied by the number of days the vehicle was hired ● total distance travelled is set to the odometer value ● date of return is set to the current date ● availability for hire is set to TRUE. Object-oriented programming will be used to model this situation. (a) Draw a class diagram that shows the following for the situation described above. ● the superclass ● any subclasses ● inheritance ● properties ● appropriate methods. [8] (b) Explain how encapsulation helps to prevent inadvertent data modification using examples from this situation. [2] (c) Explain how inheritance promotes code reuse using examples from this situation. [2]
5 9569/01/2025 [Turn over The programmer uses a database to store vehicle hire data. Each row in the table represents a vehicle hire record. A vehicle must be hired for a minimum of one day. Vehicle hire data is stored in the following table: VRN TotalDistance DateHired DateReturned CostPerDay Availability FuelType MaxLoad (d) (i) Identify the primary key for the above table. [1] (ii) Identify suitable SQL data types for the following columns: 1. DateHired [1] 2. Availability [1] (e) Explain why the above table is not in Third Normal Form (3NF). [3] A database consultant rewrites the above table into the following table descriptions: Vehicle (VRN, Type, TotalDistance, CostPerDay, Availability) Hire (VRN, DateHired, DateReturned) Car (VRN, FuelType) Van (VRN, MaxLoad) The vehicle type is stored as either 'Car' or 'Van'. (f) Identify the foreign key(s) of the tables Hire, Car and Van. [1] (g) Draw an entity-relationship (ER) diagram showing the four tables and the relationships between them. [4] (h) Write an SQL query to retrieve from the above tables the VRNs of hybrid cars and their latest date of hire. [6]
6 9569/01/2025 4 A software company is developing a print server that handles print jobs from multiple users. Each print job has a job ID and the number of pages. (a) The print server manages the print jobs with a linear queue. Explain why a linear queue would be appropriate for regular print jobs. [2] The company decides to implement the print queue as a circular queue using a static array of size 5. (b) Explain one advantage and one disadvantage of using a circular queue instead of a linear queue for this situation, where both queues are implemented using a static array of the same size. [4] (c) Draw a diagram showing the state of a circular queue after the following operations, showing the positions of front and rear pointers: 1. Enqueue jobs: 101, 102, 103, 104 2. Dequeue two jobs 3. Enqueue jobs: 105, 106 [3] (d) The print server keeps a history of completed print jobs in a stack data structure. (i) Explain how a stack data structure would be appropriate for implementing a "restore" feature that allows the system administrator to restore recently completed print jobs back to the queue. [2] (ii) Write pseudocode for a procedure restoreJobs that takes three parameters: the history stack, the print queue and an integer N. The function should restore the N most recently completed jobs from the
Content continues in the PDF. Download PDF
Related notes
- 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
- 2026_NJC Prelim_Computing_P2.pdfExam Papers · 2026
- 2026_JPJC_Computing_Prelim_P2_finalExam Papers · 2026
- 2026_JPJC_Computing_Prelim_P1_markschemeExam Papers · 2026
- 2026_JPJC_Computing_Prelim_P1_finalExam Papers · 2026
- 2026 ACJC Prelim Computing Paper 2Exam Papers · 2026
- 2024 ACJC Computing PromoExam Papers · 2024
- 2023 ACJC Promo QPExam Papers · 2023
- 2022 ACJC Computing Promo Paper 2Exam Papers · 2022
- See all H2 Computing notes

