Skill Development Lab (AL-705) - Important Questions
-
Unit 414 Marks High Priority
Explain the Factory Method design pattern. Draw the UML class diagram and sequence diagram for the pattern. Implement the Factory Method in a programming language of your choice for a given product family (e.g., different types of Document or Shape). Discuss advantages, disadvantages, and scenarios where Factory Method is preferable to simple constructors.
Core design pattern in Unit 4. Tests understanding of creational patterns, UML and coding skills; commonly asked as implementation + justification.
-
Unit 410 Marks High Priority
Describe the Abstract Factory design pattern. Draw class and object diagrams for a GUI toolkit example that produces Windows and Mac widgets. Provide sample code implementing an Abstract Factory and explain when to use Abstract Factory instead of Factory Method.
Fundamental creational pattern comparing families of related products; tests ability to model product families and justify pattern choice.
-
Unit 47 Marks Medium Priority
Implement the Singleton pattern in a thread-safe manner. Explain several implementation strategies (eager initialization, lazy initialization with double-checked locking, initialization-on-demand holder idiom) and discuss advantages and pitfalls of each approach.
Basic singleton implementation issues are commonly examined; checks knowledge of thread-safety and lifecycle concerns.
-
Unit 414 Marks High Priority
Explain the Observer (Publish–Subscribe) design pattern. Draw the UML class diagram and a sequence diagram for a Weather Station example where multiple display elements register to receive updates. Implement the pattern and discuss how to handle issues such as memory leaks and notification ordering.
Observer is a core behavioral pattern in Unit 4; exams often require design, UML and code for publish–subscribe scenarios.
-
Unit 410 Marks Medium Priority
Compare and contrast the Strategy and State design patterns. Provide UML class diagrams and short code examples for each showing where they differ in intent, structure, and runtime behavior. Give practical examples of problems best solved by Strategy and by State.
Comparative questions test pattern selection skills; Strategy and State are often contrasted in behavioral design discussions.
-
Unit 410 Marks Medium Priority
Design a solution using the Decorator pattern to add dynamic responsibilities to a TextEditor component (for example: spell-check, grammar-check, auto-save). Provide the UML class diagram, implement key classes, and explain how the Decorator preserves the original component's interface while adding functionality.
Structural/decorator questions evaluate ability to add responsibilities dynamically; common applied design question for UI or IO components.
-
Unit 410 Marks Medium Priority
Explain the Adapter and Facade design patterns. For a legacy payment API that has an incompatible interface, show how to apply Adapter to make it compatible with a new client. Then show how a Facade can present a simplified interface to a complex payment subsystem. Provide UML diagrams and code sketches.
Adapter and Facade are important structural patterns; exam tasks often ask to refactor legacy APIs or simplify subsystem interaction.
-
Unit 414 Marks High Priority
Implement the Command design pattern to support undo and redo operations for text editing actions (insert, delete, replace). Show the UML class diagram indicating Command, ConcreteCommand, Receiver, Invoker and Client. Provide sequence diagrams for execute, undo and redo operations and explain how to maintain command history.
Command with undo/redo is a standard advanced behavioral pattern question; tests design of invoker/command/receiver and state management for undo.
-
Unit 47 Marks Medium Priority
Explain the Template Method design pattern. Refactor two related algorithms that share structure into a Template Method and Concrete subclasses. Provide the UML class diagram and a short code example demonstrating the template and its hooks.
Template Method checks ability to refactor common algorithm structure into template and concrete steps; typical short implementation/diagram question.
-
Unit 414 Marks High Priority
Given a case study describing a small software system (e.g., an online bookstore with catalog, order processing, notifications, and reporting), identify at least three applicable design patterns from Unit 4. For each selected pattern, justify why it is appropriate, draw the UML diagram showing how it integrates into the system, and provide a short code sketch illustrating the application of the pattern.
Integrative case-study style question testing pattern identification, justification and application across a realistic scenario; highly likely as project-style question in Unit 4.
Quick Add to Notes
Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.
Create free accountHave an account? Log in
Notes Panel