NYJC 2025 H2 Computing Prelim Paper 1 Solutions
Uploaded by Kozak327 · 25 August 2026
Preview
Text from the first pagesQn Task 1 Algorithms, Data Representation 1ai 62842281 = 3*16^6 + 11*16^5 + 14*16^4 + 14*16^3 + 5*16^2 + 10*16^1 + 9*16^0 3BEE5A9 1aii Map each ASCII decimal character to ASCII value 54, 50, 56, 52, 50, 50, 56, 49 1bi log_2 (62842281) = 25.9... 26 bits 1bii Each ASCII character is 7 bits 56 bits 1c Integers are quicker to compare; comparing an 8-char string requires up to 8 comparisons Takes up less space in memory 1d BST has lower time complexity for adding items BST maintains items in sorted order, whereas array may require re-sorting Appropriate mentions and comparisons of time complexity for above algorithms 1e Search(Contacts, 62842281, 0, 2) Search(Contacts, 62842281, 0, 0) Depending on implementation, may also include an additional call to reach base case (not penalised if incorrect/missing): Search(Contacts, 62842281, 1, 0) base case returns -1 1f function correctly declared, returns an integer function handles a base case (start > end or other appropriate condition) function compares target with the middle item function updates the search range using a recursive call with a larger value for start or smaller value for end function correctly returns -1 or an index 1g Extreme case: 0, 99999999, etc Abnormal case: 628422B1, etc Normal case (found in array): 61625074, etc 2 Flowchart, application design 2ai ensure that input data meets a set of requirements 2aii ensure that data entered is what the user intended to enter 2b appropriate symbol for validation, verification: decision diamond appropriate validation check: format / length appropriate verification technique: double entry - verify that both entries for new password match appropriate symbol for input: parallelogram - user is asked to input new password again "Yes" -> next step, "No" -> error message password is changed only if all conditions are met 2c 3 Applications, Data Security 3a Backups of critical data must be made Backups should be made regularly Multiple copies should be made and stored offsite / in different locations, to minimise risk of complete data loss The backups should be tested to ensure that data recovery can succeed 3b Help users recognise, diagnose, and recover from errors: the reason for invalid password should be displayed below the appropriate textbox / add "Forget Catastrophic failure resulting in data loss can mean loss of business continuity (business is unable to operate), loss of revenue, loss of customer / stakeholder trust, etc Failure to protect critical data, especially financial records or customer personal data, may be a violation of data protection laws and other legal requirements
3c Data not frequently accessed can be archived by moving it to cheaper storage 3d 3e Native application The application needs to access device storage Web apps do not have the same capabilities as native apps, such as the capability to access device storage / run offline 4 Network Security 4a message is hashed (using a pre-determined algorithm) to produce a digest cipher and message are sent to recipient together with digital certificate (public key) / public key is used to decrypt the digital signature 4b a digital certificate authenticates a sender('s public key, through a certificate authority), but is unable to verify authenticity of the message contents does not verify document contents / no way to know if message has been tampered with 5 Data Management, Object-Oriented Programming 5a Vehicle: private attributes present Vehicle: public getter methods and appropriate setter methods Car and Van subclasses correct inheritance relationship between Car/Van and Vehicle additional private attributes and public getter/setter for Car: Fuel type additional private attributes and public getter/setter for Van: Maximum load hire_vehicle() method return_vehicle() method Polymorphism: all Vehicle instances have same method names 5b private attributes cannot be directly accessed or modified outside of the class, only through public methods, to prevent the object falling into an inconsistent state e.g. hire_vehicle() method ensures the total distance, date hired, return date, and availability are updated in a consistent way 5c inheritance allows subclasses to access public methods of the superclass Car and Van can access the public getter methods of Vehicle e.g. getVRN(), and do not need to duplicate the same code. 5di (VRN, DateHired) 5dii DateHired: DATE / STRING / TEXT Available: BOOLEAN / INTEGER 5e Not in 3NF 3NF requires 2NF non-key attributes CostPerDay, FuelType, MaxLoad depend only on VRN (name at least one appropriate non-key attribute) and not on the entire PK (partial dependence), hence violating 2NF 5f All entities represented: Vehicle, Hire, Car, Van Vehicle <--1--1--> Car Vehicle <--1--1--> Van Vehicle <--1--n--> Hire 5g SELECT Hire.VRN, ... (include DateHired field) Notification: ImageMaps must inform customers of the purposes of data use (e.g. through a privacy policy) Consent: ImageMaps must obtain customers' informed consent (e.g. through app permissions or webapp dialog box) Purpose Limitation: ImageMaps must ensure employees do not use customer personal data for purposes other than the stated (e.g. by using access control measures) Access and Correction: ImageMaps must allow customers to see their stored personal data, and correct it if necessary (e.g. through a web portal) (other appropriate obligations relating to collection and use, with appropriate sender encrypts digest ... with private key to produce a cipher (digital signature)
SELECT ..., MAX(DateHired) SELECT ..., MAX(DateHired) GROUP BY Hire.VRN FROM Hire INNER JOIN Car ON Hire.VRN = Car.VRN (Alternatively, filter using Vehicle.Type = 'Car' with Vehicle table joined) WHERE FuelType = 'hybrid' Correct SQL syntax and command order 6 Networking, Data Structures, Testing 6ai Each packet is tagged with a sequence number The sequence number is included in the header to allow sequential reassembly 6aii The packet data is hashed to produce a checksum The recipient verifies the checksum against its hashed data 6bi O(n) 6bii O(log n) 6ci,ii array: O(1) random read or write - Enables incoming data packets to be written in sequence quickly / in constant time regardless of message size array: number of packets must be known beforehand BST: number of packets need not be known upfront if router has limited memory / handles large number of connections: - BST might cause memory fragmentation - array might use memory inefficiently (for data packets taking a long time to arrive) 6d Runtime error 6e Suitable highlight of test inadequacy, e.g.: - The initial testing was not carried out over a sufficiently long period of time ... - Testing did not cover conditions that crashed router ... Elaboration / evidence / explanation: - ... as the program ran for multiple weeks before reaching a crash condition - ... such as high traffic levels - ... because the router had sufficiently high memory 6f Allocated memory should be freed after either branch terminates / the branch that requires reassembly should free allocated memory before end array: lower memory allocation overhead for reassembly of data packets (since all required memory is allocated upfront)
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
- JPJC 2024 JC2 Year-End Exam H2 Computing Paper 1 Marking SchemeExam 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
- See all H2 Computing notes

