Browse papers
A

Section A: Long Answer Questions

Attempt all / any as specified.

4 questions
1long12 marks

Define object orientation and explain the core principles of the object-oriented paradigm. (a) With suitable examples, distinguish between abstraction, encapsulation, inheritance and polymorphism. (b) Why is the object-oriented approach generally considered more suitable than the structured/procedural approach for modeling large, evolving software systems? Justify your answer with at least three concrete advantages.

oo-conceptsoo-modeling
2long14 marks

Consider a Library Management System in which members borrow and return books, a librarian manages the catalogue, and fines are computed for overdue items. (a) Identify the actors and at least five use cases, and draw a complete use case diagram showing <<include>> and <<extend>> relationships where appropriate. (b) Write a fully-dressed (expanded) use case description for the Borrow Book use case, including the main success scenario and at least two alternative/exception flows. (c) Draw a class diagram for the system identifying the key classes, their attributes, operations, and the associations (with multiplicities) between them.

use-case-modelinguml-diagramsclass-diagrams
3long12 marks

(a) Explain the purpose of interaction diagrams in UML and clearly differentiate between a sequence diagram and a collaboration (communication) diagram in terms of notation and what each emphasizes. (b) For an ATM Cash Withdrawal scenario (card inserted, PIN verified, amount entered, balance checked, cash dispensed), draw a sequence diagram showing the objects involved and the messages exchanged, including the failure case when the entered amount exceeds the available balance.

sequence-diagramscollaboration-diagrams
4long12 marks

Design patterns provide reusable solutions to recurring design problems. (a) Explain the classification of GoF design patterns into creational, structural and behavioural categories, giving one example pattern from each. (b) Describe the Observer pattern: state the problem it solves, draw its UML class diagram (participants and relationships), and give one real-world software scenario where it is applicable.

design-patterns
B

Section B: Short Answer Questions

Attempt all / any as specified.

8 questions
5short6 marks

With suitable examples, differentiate between association, aggregation and composition. Show how each is represented in a UML class diagram and explain how their lifetime/ownership semantics differ.

oo-conceptsclass-diagrams
6short6 marks

Draw a state (statechart) diagram for an Order object in an online shopping system that moves through states such as Created, Confirmed, Shipped, Delivered and Cancelled. Clearly label the states, transitions, events and guard conditions.

state-diagramsuml-diagrams
7short6 marks

Draw an activity diagram for the process of withdrawing money from an ATM. Use appropriate notation for the initial/final nodes, decision (branch) and merge nodes, and show at least one fork/join to represent concurrent activities.

activity-diagramsuml-diagrams
8short5 marks

State and briefly explain any four of the SOLID object-oriented design principles. For the Single Responsibility Principle, give one short example of a class that violates it and how it can be refactored.

oo-design-principles
9short5 marks

UML defines several diagram types grouped into structural and behavioural views. (a) List any four structural and four behavioural UML diagrams. (b) Briefly explain the purpose of an object diagram and how it differs from a class diagram.

uml-diagramsoo-modeling
10short6 marks

Explain the concept of use case generalization, <<include>> and <<extend>> relationships with a small example of each. When would you prefer <<extend>> over <<include>>?

use-case-modeling
11short5 marks

Compare the Factory Method and Abstract Factory creational patterns. Explain, with a brief example, the type of problem each is intended to solve and how they differ in structure and intent.

design-patterns
12short5 marks

Write short notes on any two of the following:

(a) Coupling and cohesion in object-oriented design

(b) The Singleton design pattern

(c) GRASP responsibility-assignment patterns

oo-design-principlesdesign-patterns