JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA 2019 DESIGN PATTERNS Previous Question Paper (April/May - 2019 - R13)
Note: This question paper contains two parts A and B. Part A is compulsory which carries 20 marks. Answer all questions in Part A. Part B consists of 5 Units. Answer any one full question from each unit. Each question carries 8 marks and may have a, b, c as sub questions.
PART - A
Answer all questions. 5 x 4 Marks = 20
How to select a design pattern? Explain.
Answer
Selecting a design pattern involves matching the specific design problem to the intent of the pattern. First, scan the Intent sections of patterns to identify candidates that address the problem. Compare the Applicability sections to see if the constraints and consequences align with the current requirements. Evaluate the Trade-offs and Consequences to ensure the pattern's impact on system flexibility, performance, and complexity is acceptable for the specific context.
What are design problems in Lexi’s design? Explain.
Answer
Lexi, a document editor, faced several design challenges: 1) Document Structure, requiring a recursive composition to represent complex nested elements; 2) Formatting, which needed to be independent of the physical document structure; 3) Embellishing the User Interface, such as adding borders or scrollbars without modifying core classes; 4) Supporting Multiple Look-and-Feel Standards, requiring abstraction of UI widgets; and 5) Multiple Window Systems, necessitating a portable windowing interface.
What are known uses of Proxy and Decorator?
Answer
Sign in to view the complete answer paper.
Describe implementation of Cursor.
Answer
Sign in to view the complete answer paper.
Write brief discussion on behavioral patterns.
Answer
Sign in to view the complete answer paper.
PART - B
5 x 8 Marks = 40
Explain the following phrases: i) Programming to an interface not an implementation ii) Favor object composition over class inheritance.
Answer
Sign in to view the complete answer paper.
How design patterns solve design problems?
Answer
Sign in to view the complete answer paper.
Explain the catalog of design patterns.
Answer
Sign in to view the complete answer paper.
Discuss about design patterns in Smalltalk MVC with example.
Answer
Sign in to view the complete answer paper.
Describe structures of Builder and Prototype.
Answer
Sign in to view the complete answer paper.
Discuss about user operations in Lexi’s design.
Answer
Sign in to view the complete answer paper.
Explain motivations of Abstract Factory and Factory Method.
Answer
Sign in to view the complete answer paper.
Discuss about supporting multiple window systems.
Answer
Sign in to view the complete answer paper.
Describe motivations of Proxy and Decorator.
Answer
Sign in to view the complete answer paper.
Write and explain the sample code of Flyweight.
Answer
Sign in to view the complete answer paper.
What are advantages of Bridge pattern? Explain about its implementation.
Answer
Sign in to view the complete answer paper.
Briefly explain about Facade pattern.
Answer
Sign in to view the complete answer paper.
Discuss about implementation of Iterator.
Answer
Sign in to view the complete answer paper.
Explain in detail about Command pattern.
Answer
Sign in to view the complete answer paper.
Describe structures of Memento and Mediator.
Answer
Sign in to view the complete answer paper.
Write and explain about sample code of Interpreter.
Answer
Sign in to view the complete answer paper.
Explain about motivation and implementation of Strategy.
Answer
Sign in to view the complete answer paper.
Discuss in detail about Template Method.
Answer
Sign in to view the complete answer paper.
Write history of design patterns. What to expect from design patterns? Explain.
Answer
Sign in to view the complete answer paper.