JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA V DESIGN PATTERNS Previous Question Paper (January - 2018 - R13)
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.
Part A
Answer all questions. Each question carries 4 marks.
The Gang of Four suggests a few strategies for creating good object-oriented designs. What are they?
Answer
The Gang of Four (GoF) proposes two fundamental principles for creating robust object-oriented designs that prioritize flexibility and maintainability:
- Program to an interface, not an implementation: This strategy encourages decoupling clients from specific classes by relying on abstract interfaces or base classes. By interacting with objects through their interfaces, the system remains independent of the concrete classes that implement them, allowing for easier substitution and extension.
- Favor object composition over class inheritance: This principle suggests building complex functionality by assembling objects (composition) rather than extending existing classes (inheritance). Composition provides greater runtime flexibility, as the behavior of an object can be changed dynamically by replacing its components, whereas inheritance creates rigid, compile-time relationships that are harder to modify.
What is the intent of Abstract Factory pattern? Explain.
Answer
The Abstract Factory pattern provides an interface for creating families of related or dependent objects without specifying their concrete classes. Its primary intent is to ensure that a system remains independent of how its products are created, composed, and represented.
Key aspects of the pattern include:
- Encapsulation of Creation: It isolates the concrete classes used by the client, as the client interacts only with the abstract interfaces of the products.
- Consistency: It ensures that a client uses objects from only one family at a time by grouping related products together within a single factory implementation.
- Interchangeability: Because the client code relies on abstract interfaces, concrete factory implementations can be swapped easily, allowing the entire family of products to be changed without modifying the client logic.
What is Composite pattern? Give an example.
Answer
Sign in to view the complete answer paper.
Under what conditions should an Observer pattern not be used? Explain.
Answer
Sign in to view the complete answer paper.
Explain the brief history of Design patterns.
Answer
Sign in to view the complete answer paper.
Part B
Answer any one full question from each unit. Each question carries 8 marks.
What is Design pattern? Explain the step by step approach to apply a design pattern proficiently? Also write the structure of the design pattern template.
Answer
Sign in to view the complete answer paper.
List out different design patterns that are commonly used. Write the catalog of design patterns and its organization. What are the criteria used to select them? Explain.
Answer
Sign in to view the complete answer paper.
What is creational pattern? Discuss about Singleton and Prototype patterns in detail.
Answer
Sign in to view the complete answer paper.
Explain the functionality of operations that are accessed indirectly through user operations.
Answer
Sign in to view the complete answer paper.
Discuss about the implementation issues of Builder pattern.
Answer
Sign in to view the complete answer paper.
Differentiate between adapter and bridge design pattern.
Answer
Sign in to view the complete answer paper.
What are the known uses of adapter structural pattern? Explain.
Answer
Sign in to view the complete answer paper.
Write about the language features that are exploited by Proxy pattern.
Answer
Sign in to view the complete answer paper.
What are participants of flyweight pattern? Discuss about the consequences of flyweight pattern.
Answer
Sign in to view the complete answer paper.
List out various behavioral patterns. Explain in detail about Chain of Responsibility and command behavioral patterns.
Answer
Sign in to view the complete answer paper.
What are the consequences of Mediator pattern? Explain.
Answer
Sign in to view the complete answer paper.
What are the issues to be considered while applying Memento pattern?
Answer
Sign in to view the complete answer paper.
Write in detail about Strategy and Visitor behavioral Patterns.
Answer
Sign in to view the complete answer paper.
Explain the consequences of Template Method patterns.
Answer
Sign in to view the complete answer paper.
Write the implementation issues of State behavioral pattern.
Answer
Sign in to view the complete answer paper.