Jawaharlal Nehru Technological University Hyderabad
Jawaharlal Nehru Technological University Hyderabad B.Tech IV DESIGN PATTERNS Previous Question Paper (July/August - 2023 - R15)
Note: i) Question paper consists of Part A, Part B. ii) Part A is compulsory, which carries 25 marks. In Part A, Answer all questions. iii) In Part B, Answer any one question from each unit. Each question carries 10 marks and may have a, b as sub questions.
Part A
What is a design pattern?
Answer
A design pattern is a reusable, generalized solution to a commonly occurring problem within a given context in software design. It represents a proven template or description of how to solve a problem that can be used in many different situations, rather than a finished piece of code that can be transformed directly into an application.
How model and view objects are decoupled in MVC?
Answer
In the Model-View-Controller (MVC) pattern, the model and view are decoupled primarily through the Observer pattern. The model maintains a list of dependent views and notifies them of any state changes without requiring the model to have explicit knowledge of the view's internal implementation or structure.
This decoupling is achieved through the following mechanisms:
- Notification Mechanism: When the model's data changes, it triggers an update event. The view, acting as an observer, listens for these events and refreshes its display accordingly.
- Lack of Direct Reference: The model does not contain references to view classes or methods, ensuring that the model remains independent of the user interface.
- Interface Abstraction: By using interfaces or event-driven communication, the model interacts with an abstraction of the view, allowing multiple views to be attached or detached at runtime without modifying the model's code.
List the appearance methods of basic glyph interface.
Answer
Sign in to view the complete answer paper.
Write the intent, scope, and alias name of Abstract Factory pattern.
Answer
Sign in to view the complete answer paper.
Draw the object diagram for composing a TextView object using Decorator pattern.
Answer
Sign in to view the complete answer paper.
What are the consequences of applying Proxy design pattern?
Answer
Sign in to view the complete answer paper.
How Observer design pattern is applied to messaging application?
Answer
Sign in to view the complete answer paper.
Explain how enhanced modularity is achieved with mediator design pattern?
Answer
Sign in to view the complete answer paper.
How Mediator and Singleton patterns are related with Observer pattern?
Answer
Sign in to view the complete answer paper.
What may the specific patterns to be applied for database refactoring depend upon?
Answer
Sign in to view the complete answer paper.
Part B
Describe design patterns with the help of a structured template.
Answer
Sign in to view the complete answer paper.
Explain the step-by-step approach to use a design pattern effectively.
Answer
Sign in to view the complete answer paper.
Explain the principle ‘Favor object composition over class inheritance’.
Answer
Sign in to view the complete answer paper.
Explain the Formatting algorithm in Document Structure.
Answer
Sign in to view the complete answer paper.
Compare the Glyph and Mono Glyph.
Answer
Sign in to view the complete answer paper.
Write the intent and motivation for Prototype pattern.
Answer
Sign in to view the complete answer paper.
Explain collaborations and consequences of Builder pattern.
Answer
Sign in to view the complete answer paper.
Explain in detail the composite pattern.
Answer
Sign in to view the complete answer paper.
Write the applicability, collaborations, and consequences of flyweight pattern.
Answer
Sign in to view the complete answer paper.
Write the intent, motivation, and structure of Proxy pattern.
Answer
Sign in to view the complete answer paper.
Write the intent, applicability, and consequences of Chain of Responsibility pattern.
Answer
Sign in to view the complete answer paper.
Write the intent, alias name, structure and Related patterns of Command pattern.
Answer
Sign in to view the complete answer paper.
Take part in explaining how Mediator design pattern is used in Multiplayer games.
Answer
Sign in to view the complete answer paper.
Write intent, alias name, applicability, and structure of State pattern.
Answer
Sign in to view the complete answer paper.
Explain in brief how Strategy pattern is used in financial trading systems?
Answer
Sign in to view the complete answer paper.
Write short notes on the following:
Document and Learning Aid.
Answer
Sign in to view the complete answer paper.
Life Cycle of Object-Oriented Software.
Answer
Sign in to view the complete answer paper.