JNTU
JNTU B.Tech III DESIGN PATTERNS Previous Question Paper (February/March - 2022 - R16)
Answer any five questions. All questions carry equal marks.
Main
What are some common causes of the redesign? Explain.
Answer
Redesign is often necessary when software requirements evolve or initial designs prove inflexible. Common causes include:
- Tight coupling: Dependencies between classes make it difficult to modify one part of the system without affecting others.
- Lack of abstraction: Failing to anticipate future changes leads to code that is hard to extend or reuse.
- Hard-coded dependencies: Directly instantiating objects prevents the use of different implementations or configurations.
- Inability to subclass: Designing classes that are not intended to be extended limits the system's adaptability.
- Platform or environment changes: Shifts in hardware, operating systems, or external libraries may require significant structural adjustments.
How to use a design pattern? Explain in detail.
Answer
To effectively use a design pattern, follow these systematic steps:
- Identify the problem: Analyze the current design constraints, such as inflexibility, tight coupling, or redundant code, to determine if a pattern is applicable.
- Study the pattern: Understand the intent, structure, participants, and consequences of the pattern to ensure it addresses the specific problem.
- Examine the consequences: Evaluate the trade-offs, such as increased complexity or performance overhead, to ensure the pattern is the right fit.
- Adapt the design: Modify the existing code structure to incorporate the pattern's participants (classes and interfaces) while maintaining the original functionality.
- Implement and Refine: Write the code, ensuring that the pattern's collaborations are correctly realized, and refactor as necessary to improve clarity and maintainability.
Draw a diagram to describe design pattern relationships.
Answer
Sign in to view the complete answer paper.
Explain in detail about “supporting multiple window systems”.
Answer
Sign in to view the complete answer paper.
Explain the Spelling Checking and Hyphenation design problem in detail.
Answer
Sign in to view the complete answer paper.
Explain in detail about bridge design pattern.
Answer
Sign in to view the complete answer paper.
What are the consequences of the Builder pattern? Explain Builder pattern implementation.
Answer
Sign in to view the complete answer paper.
Write about motivation and consequences of Façade pattern.
Answer
Sign in to view the complete answer paper.
Write sample code of Composite pattern.
Answer
Sign in to view the complete answer paper.
Discuss the participants of the Adapter pattern and explain the functions of each.
Answer
Sign in to view the complete answer paper.
Describe in detail about Iterator Pattern.
Answer
Sign in to view the complete answer paper.
Discuss the structure and participants of the state design pattern.
Answer
Sign in to view the complete answer paper.
Write about the implementation issues of the memento pattern.
Answer
Sign in to view the complete answer paper.
What is Command Pattern? Describe in detail about structure, participants and collaborations of the Command pattern.
Answer
Sign in to view the complete answer paper.
Discuss how to make the user interface more attractive in document editors.
Answer
Sign in to view the complete answer paper.
Write about the intent, motivation, structure, and applicability of the Visitor pattern.
Answer
Sign in to view the complete answer paper.
Discuss in detail about proxy design pattern.
Answer
Sign in to view the complete answer paper.
Explain the motivation of the Mediator pattern.
Answer
Sign in to view the complete answer paper.