Skip to content

Design Pattern

SWE · Final · Spring 26

Paper 2 of 2By Sabbir HRSwitch

Paper 2 of 2

This browser can’t show the PDF here

Open it, and your phone’s PDF viewer takes it, or download it.

Read the questions as text

Read off the PDF by AI, so it may have mistakes. The PDF is the original.

Daffodil International University Faculty of Science & Information Technology Department of Software Engineering Final Term Examination, Spring 2026 Course Code: SE 311; Course Title: Design Pattern Sections & Teachers: A-D(MHN), E-H(MRN), I(ZH), J(AZ) Time: 2:00 Hrs Marks: 40 [The figures in the right margin indicate the full marks and corresponding course outcomes. All portions of each question must be answered sequentially.] 1. a) A software company is developing a Smart Home Control System. In this system, there are several separate sub-systems, such as: LightSystem, ACSystem, CameraSystem. To improve usability, the company wants to provide a single simplified interface where the user can activate a "LeaveHome" system, and this system should internally control or take actions on the sub-systems. Apply the appropriate design pattern and write a Java code to develop the system mentioned above. [Marks-6] CLO-2 Level-3 1. b) An E-commerce company 'Online Dokan' is developing an Online Payment System. The client system currently supports a standard interface called Payment Gateway, which defines a method: pay(amount). Now, the company wants to integrate two third-party payment services: BkashAPI, RocketAPI. To connect these two API's with the client, the system need two connectors. Draw the UML class diagram of the appropriate Design Pattern for the above scenario. [Marks-4] 2. a) In DIU employee management system, when a faculty member applies for leave, the leave request must go through several processing stages in sequence: - First, the 'Head' recommends() the leave and forwards to the next. - Next, the 'Dean' approves() the leave and forwards to the next. - Finally, the 'HR' processes() the leave in the system. The leave request flow starts from the Main Class. Construct a Java code implementing the appropriate design pattern to develop the system mentioned above. [Marks-9] CLO-3 Level-3 2. b) A software company is developing a Text Editor Application. The editor allows users to format the basic text initially. Later, users can apply additional edit options such as: Bold, Italic. The Bold and Italic edit option classes should have a Parent class. There should be a common interface for both the basic and edited text. Apply the appropriate design pattern for the above scenario and write a Java code for it. [Marks-6] 3. a) At DIU, the Registrar Office frequently sends important notices (e.g., exam schedules, holidays, policy updates) via email. The Registrar Office can add, remove, and notify two different groups: Students, Employees. These three groups can receive the notices from the Registrar Office. i. Design a UML class diagram for the above system. ii. Construct a Java code with the appropriate design pattern to develop this system. [Marks-3+6] CLO-4 Level-6 3. b) A developer is building a University Management System. The class UniManager stores student data, calculates fees, sends email notifications, and manages course registration. The system has a base class called User with methods such as submitAssignment(), gradeStudent(), and admitStudent(). Classes like Student, Faculty, and Admin 'inherit' from it, although some of them do not need all these methods. For notifications, the developer creates emailnotification() method directly inside the UniManager class. When smsnotification() method is later required, the same class is modified again to add the new feature. Categorize the above development principle violations, in terms of SOLID Principles with reasoning. [Marks-6]