2023 C2 Prelim P1 Commented Sol
Uploaded by user7295 · 14 October 2023
Preview
Text from the first pagesHWA CHONG INSTITUTION C2 PRELIMINARY EXAMINATION 2023 COMPUTING Higher 2 Mark Scheme 13 Sept 2023 Paper 1 (9569 / 01) 1400 -- 1700 hrs 1. The examinations department of a school needs to store data on the examinations taken by its students. Examination subjects are classified as one of the two types, namely academic subjects and practical subjects. For all subjects, the data that will be stored include: ● Subject code ● Subject name ● Subject type The assessment process for an academic subject comprises two written papers. The duration of each of these two papers will be stored. For the practical subject’s assessment process there are no written papers but there is a single practical examination. A practical examination has a duration and a final date. (a) Draw a diagram that shows suitable classes and their relationships for a solution to this problem that uses OOP techniques. Include appropriate attributes and methods in each class. [6] (b) The school also offers vocational subjects to their students. A vocational subject has no formal examinations, but the assessment is based on the work that the students complete throughout the course. However, this coursework has to be completed by a certain date. Suggest any changes that need to be made to the classes used in part (a). [3] (c) Explain the difference between a class and an object. [2] (d) Give two benefits of Object-Oriented programming. [2]
Solution: (a) SUBJECT - SubjectCode - SubjectName - SubjectType + SetSubjectCode() + SetSubjectName() + SetSubjectType() + GetSubjectCode() + GetSubjectName() + GetSubjectType() ACADEMIC PRACTICAL - Paper1Len - Paper2Len - PracLen - FinalDate + SetPape1Len() + SetPaper2Len() + GetPaper1Len() + GetPaper2Len() + SetPracLen() + SetFinalDate() + GetPracLen() + GetFinalDate() Superclass (Subject) and two subclasses (Academic, Practical) Inheritance from Subject superclass (arrows point upward) Attributes and methods for Subject class Attributes and methods for Academic class Attributes and methods for Practical class Private attributes (minus sign) and public methods (+ sign) (b) Define a new class: Vocational Inherits from Subject class Attribute: CompletionDate Methods: getting and setting CompletionDate (c) Class: ● User defined data type ● Used as a blueprint to create individual objects that have common attributes and methods Object: ● Is an instance of a class
● Each object has unique values to the properties defined in the class ● Take up memory space (d) Benefits of OOP: ● Reuse of code through inheritance ● Enhance security through encapsulation and abstraction ● Flexibility through polymorphism ● Modularity for easier troubleshooting ● Effective problem solving ● Methods can be changed without affecting how they are used. *Marker’s Comments: (a) Students should name classes in the singular. E.g. Subject instead of Subjects. A few responses had the inheritance arrows pointing in the wrong direction or had no arrows. (b) The question asks to suggest any changes to the classes, you must explain the changes clearly rather than drawing a new class diagram. (c) Class: Many answers used, correctly, words such as ‘template’ or ‘definition’ but failed to make it clear that a class is a template or a definition for a collection of objects, not a single object. These objects have a common set of properties and methods. Object: Many correctly stated that an object is an instance of a class and the object’s properties would have real data. (d) Answers that scored marks included re-use being easier (as a result of inheritance), data being hidden / protected and only accessible from public methods. 2. (a) Describe one advantage and one disadvantage of client-server network. [2] (b) Describe one disadvantage of packet switching and how the problem can be handled. [2] (c) Describe two differences between switch and router in the TCP/IP model. [2] (d) Explain the term Domain Name Server (DNS) and how it works. [5] Solution: (a) Advantage: if one client is down, the whole system can still continue to work. OR Server has access control of clients. Disadvantage: If the server is attacked, the whole system is down. OR Server requires a high level of maintenance, e.g. cost of hardware, professional training.
(b) It requires more time for reassembly at the destination device as packets may arrive in random order. To handle this, a sequential number is attached to each packet, and efficient algorithms are used to sort the packets into the original order. (c) Switch uses MAC addresses at the Data Link layer, Router uses IP address at the Network layer. (d) DNS server translates domain name in human language to IP addresses in machine language. DNS server first checks if the requested domain name is available in its cache. If not found in its cache, it sends request to the local DNS by the Internet Service Provider. If still not found, DNS searches from a hierarchy of distributed database to locate the domain name. Once found, DNS server sends the IP address back to the user. Marker’s Comments: Network and Security requires careful reading of the question (no missing answers, no misunderstanding) and content answer (no s hort answers with few words). Answer within the syllabus is highly recommended, marks may differ for out -of-syllabus answers. (b) The problem can be handled within packet switching, not to change to circuit switching. (c) Many students did not specify th e layer in the model. 3. (a) Give one example of multi-factor authentication. [1] (b) Explain how a Denial of Service (DOS) attack can compromise an internal server and suggest one protection scheme to detect a DOS attack. [3] (c) Give two purposes of using digital signature and describe how it works. [8] Solution: (a) multi-factor from the three categories: ● Something you know: password ● Something you have: OTP, token, access card, passport/NRIC card ● Something you are: fingerprint, retina, voice, face (b) DOS attacks the network traffic by sending massive request to exhaust server resources and bandwidth, and hence disables the server from responding to legitimate requests. It can be detected by fire wall, intrusion detection/protection system. (c) purpose: ● Authentication: the message was created by the known sender ● Non-repudiation: the sender cannot deny having sent the message ● Integrity: the message is not altered in transit
Process: ● The sender uses a hash algorithm to create a hashed version of the message ● The sender uses its private key to encrypt the hash to the digital signature ● Both the message (encrypted or not) and the digital signature are sent to the receiver ● The receiver uses the sender’s public key to decrypt the digital signature back to the sender’s version of hash ● The receiver uses the same hash algorithm to create a new hash from the received message ● If the two hashes match, it means the data is not altered and is sent by the known sender 4. (a) The following are the inorder and postorder traversal of a binary tree whose nodes are labelled 1, 2, . . . , 9. Inorder: 4, 7, 2, 1, 5, 3, 8, 6, 9 Postord
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

