Question 1
8 Marks

Objective Section

8 MCQs  × 0.5 4 Marks
8 True / False  × 0.5 4 Marks
Design Patterns NFRs Layered Arch. Data Flow UML
Question 2
12 Marks

Pattern Matching

A scenario-based matching question will come from the design patterns chapter.

Coverage Prepare These Topics
Design Patterns Creational, Structural, Behavioral
Scenario-based Pattern matching Category-level prep
Question 3
17 Marks

Short Questions (3 Different Questions)

Short Question 1 5 Marks
Short Question 2 6 Marks
Short Question 3 6 Marks

Possible topics — study class structure & code:

Singleton Pattern Composite Pattern Layered Architecture Factory Method Decorator Pattern Builder Pattern
Question 4
8 Marks

Long Question — Design Patterns

One long descriptive question will come from design patterns.

Conceptual understanding Categories Code/class structure prep
Question 5
5 Marks

Case Study — Use Case & Activity Diagram

What to expect

A short scenario (2–3 paragraphs). You will be asked to draw one or both diagrams from it.

Use Case Diagram

Identify Actors (Who) and Use Cases (What they do). Draw system boundary, stick figures, ovals, and connection lines.

Activity Diagram

Extract the flow of steps from the scenario. Include start node, actions, at least one decision diamond (Yes/No), and end node.

Actors from nouns Use cases from verbs Decision node required System boundary box Start & End nodes
Q1 · Objective
8
8 MCQ + 8 T/F
Q2 · Pattern Match
12
From design patterns chapter
Q3 · Short (×3)
17
5 + 6 + 6 marks
Q4 · Long
8
Design Patterns
Q5 · Case Study
5
Use Case · Activity
Grand Total
50
Marks
Pattern Practice Scenarios
Use these for scenario-based pattern matching practice.
Scenario 1

A document editor lets users export reports as PDF, Word, or HTML. The editor should call one common method to create the right exporter object, instead of using large if-else blocks in client code.

Hint: create, exporter, subclass choice, common interface
Scenario 2

A logistics app ships orders by truck in cities and by ship for islands. The order system should request a transport object without knowing the exact concrete class used for delivery.

Hint: create object, decide by context, client unaware
Scenario 3

A game creates different enemy characters for desert, snow, and jungle levels. Each level module should decide which enemy object gets instantiated while gameplay code stays unchanged.

Hint: creation delegated, same parent type
Scenario 4

A UI toolkit supports Windows and Mac themes. Once a theme is selected, matching buttons, checkboxes, and menus must come from the same family.

Hint: product family, matching objects
Scenario 5

A furniture app sells modern and classic collections. Choosing one style should generate sofa, table, and chair from the same design family.

Hint: compatible set, grouped creation
Scenario 6

A database tool supports MySQL and PostgreSQL. After selecting one environment, matching connection, command, and transaction objects should be created as a set.

Hint: related factory, consistent group
Scenario 7

A pizza app lets users choose crust, size, toppings, and sauces. Many optional combinations exist, so the final object should be assembled in readable steps.

Hint: step by step, optional parts
Scenario 8

A report generator creates reports with optional sections such as charts, summary, and appendix. Different departments need different section combinations.

Hint: construction process, assembled parts
Scenario 9

A computer store lets users configure RAM, CPU, SSD, GPU, and cooling. The object should be built piece by piece instead of using a huge constructor.

Hint: many parameters, gradual setup
Scenario 10

A game spawns many soldiers with the same setup and only changes position and health. The engine wants to copy a preconfigured template quickly.

Hint: template object, cloning
Scenario 11

A form designer stores a ready-made layout. Teachers copy the base form for many courses and then edit a few fields.

Hint: copy base instance, clone then modify
Scenario 12

A dashboard tool loads a heavy widget with defaults. To create similar widgets, it copies the existing configured widget and tweaks few properties.

Hint: expensive creation, quick copy
Scenario 13

A logging service should have exactly one shared logger instance used by all classes.

Hint: one shared object, central access
Scenario 14

A print server controls one physical printer. Multiple modules request printing, but one manager instance must coordinate access.

Hint: unique instance, shared resource
Scenario 15

A desktop app must use only one session cache controller to avoid inconsistent data across screens.

Hint: exactly one instance, shared state
Scenario 16

A payment module expects pay(), but an old library exposes makeTransaction(). A small translator object is needed between them.

Hint: incompatible interface, translator
Scenario 17

A USB-C charger must connect to an HDMI-only projector using a compatibility wrapper.

Hint: mismatch, interface conversion
Scenario 18

A Java app expects a standard sender interface, but a third-party API has different method names and parameters.

Hint: wrapper translator, reuse existing code
Scenario 19

A remote system has simple/advanced remotes and many device types. Both sides should vary independently.

Hint: two hierarchies, independent variation
Scenario 20

A shape library has shapes and multiple renderers. Shapes and rendering engines should evolve separately.

Hint: abstraction vs implementation
Scenario 21

Reports and invoices can be exported through PDF or Excel engines. Keep document types separate from export implementations.

Hint: decouple abstraction, two dimensions
Scenario 22

A coffee app starts with plain coffee and stacks milk/sugar/cream dynamically at runtime.

Hint: wrap object, add behavior dynamically
Scenario 23

A sender works normally, but logging/retry/encryption must be attached in different runtime combinations.

Hint: layered wrapping, runtime enhancement
Scenario 24

A photo app applies border, watermark, and shadow one after another while keeping same interface.

Hint: chained wrappers, same component
Scenario 25

A file manager must run the same display() operation on both files and folders in a tree structure.

Hint: part-whole tree, uniform treatment
Scenario 26

A graphics editor supports groups containing shapes and nested groups; all support the same draw command.

Hint: leaf and group same interface
Scenario 27

An e-commerce tree has categories/subcategories/products; one operation should work on single product or full category.

Hint: recursive container, whole-part
Scenario 28

A smart home UI buttons should hold action objects so actions can be logged and undone later.

Hint: action object, invoker/receiver
Scenario 29

A restaurant queues kitchen tasks for later execution without waiter knowing implementation details.

Hint: request as object, delayed execution
Scenario 30

A scheduler triggers backup/cleanup/report jobs at midnight with logging and retries.

Hint: command object, job queue
Scenario 31

An HR module traverses employees one by one without exposing internal collection structure.

Hint: sequential access, hide structure
Scenario 32

A playlist should support next()/hasNext() regardless of whether songs are stored in array/list/linked structure.

Hint: traversal object, collection hidden
Scenario 33

A game inventory custom container should display items in order without direct index access.

Hint: cursor-like traversal
Scenario 34

When weather updates, multiple displays should refresh automatically.

Hint: one-to-many, subscribers
Scenario 35

When product price changes, email/SMS/recommendation services react immediately.

Hint: notify all, listeners
Scenario 36

When a new video is uploaded, all subscribers should get alerts while staying loosely coupled.

Hint: subject change, broadcast notification
Last Question Practice — 2 Random Scenarios
Practice for the 5-mark case study (Use Case + Activity Diagram extraction).
Random Case 1 — Hostel Complaint System

Students submit hostel complaints with room number, category, and issue text. The warden reviews and assigns each complaint to an electrician, plumber, or carpenter. The assigned staff updates status as In Progress or Resolved. Students can track complaint status and receive a message when resolved.

Practice focus: actors, use cases, status decision flow, activity transitions
Random Case 2 — University Bus Pass Renewal

Students apply online for bus-pass renewal by uploading fee receipt and selecting route. The transport office verifies documents; if valid, the system generates a renewed pass and sends a QR code. If documents are invalid, the request is rejected with reason and student can reapply.

Practice focus: use case boundary, approval/reject branch, start-end activity path
Solutions
Quick answer key for pattern scenarios + model solution outline for the two random case studies.

Pattern Scenario Answer Key

Scenario Range Pattern
1-3Factory Method
4-6Abstract Factory
7-9Builder
10-12Prototype
13-15Singleton
16-18Adapter
19-21Bridge
22-24Decorator
25-27Composite
28-30Command
31-33Iterator
34-36Observer

Random Case 1 — Hostel Complaint System (Model Solution)

Use Case Solution

Actors: Student, Warden, Maintenance Staff.

Main Use Cases: Submit Complaint, Review Complaint, Assign Complaint, Update Status, Track Status, Send Resolution Notification.

System Boundary: Hostel Complaint Management System.

Hostel Complaint Management System Submit Complaint Track Status Review Complaint Assign Complaint Update Status Send Resolution Notification Student Warden Maintenance Staff
Activity Solution

Flow: Start -> Student submits complaint -> Warden reviews -> Assign staff -> Staff updates status.

Decision: Resolved? If No -> back to In Progress. If Yes -> send notification -> End.

Submit Complaint Warden Review Assign Staff Update Status Resolved? Send Notification Continue In Progress Yes No

Random Case 2 — Bus Pass Renewal (Model Solution)

Use Case Solution

Actors: Student, Transport Office.

Main Use Cases: Apply for Renewal, Upload Documents, Verify Documents, Approve Renewal, Reject Renewal, Generate QR Pass, Reapply.

System Boundary: Bus Pass Renewal System.

Bus Pass Renewal System Apply Renewal Upload Documents Reapply Verify Documents Approve / Reject Generate QR Pass Student Transport Office
Activity Solution

Flow: Start -> Student submits renewal -> Office verifies documents.

Decision: Documents valid? If Yes -> generate renewed pass + send QR -> End. If No -> reject with reason -> student reapply path -> End.

Submit Renewal Request Verify Documents Valid? Generate QR Pass Reject + Show Reason Student Reapplies Yes No