Browse papers
A

Section A: Long Answer Questions

Attempt all / any as specified.

4 questions
1long12 marks

(a) Define object orientation and explain how it differs from the structured (procedural) approach to software development. (4)

(b) With suitable examples, explain the four fundamental principles of object orientation: abstraction, encapsulation, inheritance, and polymorphism. (8)

oo-conceptsoo-design-principles
2long14 marks

Consider a Library Management System in which members can search for books, borrow and return books, and reserve books that are currently issued. A librarian manages the catalogue and registers fines for overdue books.

(a) Draw a use case diagram for the system, clearly showing the actors, use cases, and the «include» and «extend» relationships where appropriate. (7)

(b) Identify the key domain classes, their attributes and operations, and draw a class diagram showing associations, multiplicities, and at least one aggregation/composition relationship. (7)

use-case-modelingclass-diagramobject-modeling
3long14 marks

For an online ticket booking system, consider the use case "Book a ticket" in which a customer selects a show, the system checks seat availability, the customer makes a payment through a payment gateway, and a confirmed ticket is generated.

(a) Write the operation contract for the system operation makePayment(), clearly stating its pre-conditions and post-conditions. (4)

(b) Draw a sequence diagram for the "Book a ticket" scenario, showing the participating objects, messages, return values, and any loops or alternative fragments. (10)

sequence-diagraminteraction-diagramuse-case-modeling
4long12 marks

(a) What is a design pattern? Explain the three categories of GoF design patterns (creational, structural, behavioural) with one example pattern from each category. (6)

(b) Explain the Observer pattern. Draw its class/structure diagram and describe a real-world scenario where it is the most appropriate design choice. (6)

design-patternsoo-design-principles
B

Section B: Short Answer Questions

Attempt all / any as specified.

9 questions
5short6 marks

Differentiate between association, aggregation, and composition relationships in a class diagram. Illustrate each with a suitable example and the corresponding UML notation.

class-diagramoo-modeling
6short6 marks

List the different categories of UML diagrams (structural and behavioural). Briefly explain the purpose of any three behavioural diagrams.

uml-diagrams
7short6 marks

Distinguish between a state (statechart) diagram and an activity diagram. Draw a state diagram for an Order object that goes through the states: created, paid, shipped, delivered, and cancelled.

state-diagramactivity-diagram
8short6 marks

What is a collaboration (communication) diagram? How does it differ from a sequence diagram? Draw a collaboration diagram for a simple withdraw cash from ATM interaction.

collaboration-diagramsequence-diagram
9short6 marks

State and explain any three of the SOLID principles of object-oriented design, giving a short example of a violation and its fix for each.

oo-design-principles
10short6 marks

Define the terms actor, use case, scenario, and use case extension. Explain the difference between the «include» and «extend» relationships in use case modeling.

use-case-modeling
11short6 marks

Draw an activity diagram for the process of user registration with email verification, in which the system validates input, sends a verification email, and activates the account only after the user clicks the verification link. Show the use of fork/join and decision nodes where appropriate.

activity-diagramuml-diagrams
12short6 marks

Explain the Singleton design pattern. Why is it used, what problems can it cause, and write a code skeleton (in any OO language) that ensures only a single instance is created.

design-patterns
13short4 marks

Write short notes on any two of the following:

(a) Coupling and cohesion

(b) Polymorphism and dynamic binding

(c) Stereotypes in UML

oo-conceptsuml-diagrams