JPJC 2024 JC2 Year-End Exam H2 Computing Paper 1 Marking Scheme
Uploaded by Kozak327 · 25 August 2026
Preview
Text from the first pagesQuestion Solution Marks Allocation 1(a) String data type. Patient number has always got to be 4 digits in length, where some patients may have patient numbers with leading zeros eg. 0031. [1] [1] 1(b) A collision happens when a patient record is hashed by the hashing algorithm to a memory location that is already full. OR A collision happens when a patient record is hashed by the hashing algorithm to a memory location that already stores two patient records stored within. [1] [1] SR: -1m if student gets answer correct but suggests in any ways the memory location stores one record and it is full. -1m if context is not given in response. 1(c) … 212 1425 (1m) 3423 (collision) (1m) (1m) 211 1422 2422 210 …… Memory location Memory 1m : location 211 both correct 1m: location 212 stores 1425 1m: 3423 stored in location 212 as a result of collision 1(d) The data of the patient record that is to be deleted will be marked by a tombstone value to indicate that it has been deleted. The patient record deleted is intentionally left in position within the memory location for the purpose of allowing future search to be performed [1] [1] 1(e) Apply the rightmost three digits of the patient number to the hash algorithm to obtain the hashed memory location to store the patient record. Go to the hashed memory location, if there is an empty item in the memory location, insert patient record to the empty item of the memory location, and break out. Else Repeat Check if memory location is full Check if first item of memory location is tombstone marked. If yes, overwrite new patient record in to the first item in memory location Break Check if second item of memory location is tombstone marked If yes, store new patient record in to the second item in memory location Break If both items in memory location are occupied, move to [1] mention of hashing right most 3 digits of patient number to get the hashed memory location [1] Mention of going to the memory location to check if there are any empty slots. If there is store record in the empty slot [1] if memory location is
2 the following memory location Until patient record gets stored. entirely full, check if any of the items is tombstone marked and store record over the existing deleted record [1] Go to the next memory location and repeat the steps above 1(f) Patient A: Patient Number = 1246, National Identity Number = S7654301Z H(1246) = 123 Pos 8 7 6 5 4 3 2 1 ID 1 2 3 4 3 0 1 C Product 8 14 18 20 12 0 2 C Product sum = 8 + 14 + 19 + 20 + 12 + 0 + 2 = 74 74 mod 11 = 8 C = (11 – 8) mod 11 = 3 Therefore, Patient A new Patient ID is 12343013 Patient B: Patient Number = 5323, National Identity Number = S8563222B. H(323) = 161 Pos 8 7 6 5 4 3 2 1 ID 1 6 1 3 2 2 2 C Product 8 42 6 15 8 6 4 C Product sum = 8 + 42 + 6 + 15 + 8 + 6 + 4 = 89 89 mod 11 = 1 C = (11 – 1) mod 11 = 10 Therefore, Patient B new Patient ID is 1313222X (where X = 10) [1] - correct product sum [1] - correct answer [1] - correct product sum [1] - correct answer [1] - state where X = 10
3 1(g) New Patient ID of Patient C = 21167892 Pos 8 7 6 5 4 3 2 1 ID 2 1 1 6 7 8 9 2 Product 16 7 6 30 28 24 18 2 Product sum = 16 + 7 + 6 + 30 + 28 + 24 + 18 + 2 = 131 Since 131 mod 11 <> 0 Therefore, the new patient ID of Patient C is invalid. [1] - workings in attempt to obtain product sum [1] use 131 mod 11 <> 0 as reasoning leading to invalid conclusion. 2(a) A Distributed Denial-of-Service (DoS) attack is carried out by one or a group cybercriminals that controls a network of Internet-connected machines known as botnet. The attacker then sends remote instructions to each bot in the botnet to send voluminous bogus requests to the server that stored the medical records to overwhelm the resource and capacity of the server. When the server direct its resources to handle the bogus requests and gets overwhelmed, it results in depriving the genuine users of the medical system from accessing the information stored in the system. [1]: mention of botnet or network of devices controlled by cybercriminals. [1] bots send repeated bogus requests to the server to overwhelm server. [1] with a purpose of depriving genuine users from accessing the server. 2(b) Any one of the methods below with elaboration: 1. Man – in – the middle attack – Intercepting communication between two parties to obtain personal information. 2. Malicious Software – device could be infected with malware, such as keyloggers and packet sniffers, to monitor and steal private data. 3. SQL Injection – hacker inserts their own code into a website to breach its security measures and access protected data. Once inside, they can control the website's database and hijack user information. [1] method [1] explanation of how the method is used to steal data. 2(ci) The sender applies the message it wishes to send to a hash algorithm in order to obtain a digest of the message (also known as message hash). Sender then encrypts digest using his/her private keys. The encrypted digest is also known a small digital representation of the message that is unique to the message. Sender then attaches the digital signature together with the original message it wishes to send and have it sent to the receiver. (The reason for encrypting the hash instead of the entire message is because a hash function can convert an arbitrary input into a fixed- length value, which is usually much shorter. This saves time, as hashing is much faster than signing). [1] mark for each point. [Total 3m]
4 2(cii) Since the message is encrypted using sender’s private key, the only way to decrypt the message is by use of sender’s public key. Recipient will use the public key of the sender to decrypt the digest. If the recipient can successfully decrypt the message it means the sender is authenticated as the sender’s public key is the only key to decrypt the encrypted message, given that the sender keeps its private key only to itself. Independently, the recipient would also put the message received to the same hash algorithm to obtain a digest of its own. Recipient will then compare the decrypted digest it receives to the digest it generates. If the two digest are exactly similar it means that the received message is authentic (ie. from the sender) as the message received has not been changed since the sender sends it out. [1] sender’s public key can only be used to decrypt [1] reasons to explain 2(d) Backup file: a copy of data that can be restored in case of data loss, corruption, or a system failure. Archive file: To store data that is no longer actively used but needs to be retained for long-term reference, compliance, or historical purposes [1] [1] 2(e) Data validation is the process that ensures that the data entered is accurate, meaningful, sensible and meets certain predefined criteria. Data verification is the process that ensures that the data entered is consistent and matches exactly to its original source. [1] [1] 2(f) Data validation: Presence check, type check, length check on any relevant specific input of data related to patient. Data verification: Double entry or getting another staff to verify the patient record entered by the data entry clerk 3(a) PATIENT -PatientID: STRING -Name: STRING -Address: STRING -ContactNo: STRING -Consult_cost: FLOAT -Med_cost: FLOAT +constructor() // get/set m
Content continues in the PDF. Download PDF
Related notes
- JPJC 2024 JC2 Prelim Paper 2 QPExam Papers · 2024
- JPJC 2024 JC2 Prelim Paper 2 MS v2Exam Papers · 2024
- JPJC 2024 JC2 Year-End Exam H2 Computing Paper 1Exam Papers · 2024
- 2024 ASR H2 Computing Prelim P1 SolExam Papers · 2024
- 2024 ASR H2 Computing Prelim P1 QnsExam Papers · 2024
- 2025 VJC H2 Computing Prelim Paper 1Exam Papers · 2025
- 2025 VJC H2 Computing Prelim Paper 1 SolutionsExam Papers · 2025
- 2025 TJC H2 Computing Prelim Paper 1 SolutionsExam Papers · 2025
- RVHS 2025 H2 Computing Prelim Paper 1Exam Papers · 2025
- RVHS 2025 H2 Computing Prelim Paper 1 SolutionsExam Papers · 2025
- RI 2025 H2 Computing Prelim Paper 1Exam Papers · 2025
- RI 2025 H2 Computing Prelim Paper 1 SolutionsExam Papers · 2025
- See all H2 Computing notes

