DHS 2024 Y6 H2 Computing Prelim Paper 1 Ans_Only_final
Uploaded by ajjj · 27 April 2025
Preview
1 (a) Copy and complete the decision table showing all the possible outcomes and results. [4] Ans: Condition 1 2 3 4 5 6 7 8 Has customer been refused insurance by another company? Y Y Y Y N N N N Is car over 10 years old? Y Y N N Y Y N N Has customer make more than 3 claims previously? Y N Y N Y N Y N Action Insurance refused X X - Insurance without discount available X X X X - Insurance with discount available - X [1] [1] [1] [1] (b) Simplify your decision table by removing redundancies. [2] Ans: Condition 1 2 3 4 Has customer been refused insurance by another company? Y Y N N Is car over 10 years old? Y N Y N Has customer make more than 3 claims previously? - - - N Action Insurance refused X Insurance without discount available X X Insurance with discount available X [1] [1] {6} 2 (a) Draw a diagram that shows suitable classes and their relationships for a solution to different payment type for guests of different activity that uses OOP techniques. Include appropriate attributes and methods in each class. [6] Ans: Class names [1] Private attributes [2] Public methods [2] Arrow:[1] (b) What are the benefits of using OOP? [2] Ans: - Reusability: Programs can be assembled from pre-written software components that can be used in many different applications. - Extensibility: New software components can be written or developed from existing ones without affecting the origin components Guest Private: nNo sGuest aCode Public: set_hNo() get_hNo() set_sGuest() get_sGuest() set_aCode() get_aCode() Payment() Member Private: nVisits Public: get_nVisits () set_nVisits () Payment() Non_Member Private: nmVoucher Public: set_Vouchor() get_Vouchor() Payment()
(c) The three key features of the object-oriented approach are often quoted as: [6] (i) Encapsulation [2] Ans: Encapsulation is the mechanism for restricting the access to some of objects' components; this means that the internal representation of an object can't be seen from outside of the objects definition. Access to this data is typically only achieved through special methods. (ii) Inheritance [2] Ans: Inheritance means that one class inherits the attribute and methods from parent class as part of its definition. (iii) Polymorphism [2] Ans: Allows different objects to respond to the same message in different ways, the response specific to the type of object. What do these three features mean? {14} 3 Decomposition and modularity are important concepts in software development. Explain what they mean and how do they benefit in software development. [4] Ans: Max 4 marks Concepts of decomposition. The process of identifying first the major task, them further subtasks within them, is known as functional
Content continues in the PDF.
Related notes
- ACJC 2025 JC2 Computing Prelim Paper 1Exam Papers · 2025
- ACJC 2025 JC2 Computing Prelim Paper 1 SolutionsExam Papers · 2025
- VJC Chapter 23 Web Applications PrinciplesNotes/Practices · 2025
- VJC Chapter 20 SQLNotes/Practices · 2025
- VJC Chapter 16 Hash TableNotes/Practices · 2025
- VJC Chapter 22 NoSQLNotes/Practices · 2025

