JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA V DESIGN PATTERNS Previous Question Paper (August - 2017 - 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.
PART - A
What is meant by a design pattern? Discuss the significance.
Answer
A design pattern is a reusable solution to a commonly occurring problem within a given context in software design. It is not a finished piece of code but a template or description of how to solve a problem that can be used in many different situations.
The significance of design patterns lies in their ability to provide a common vocabulary for developers, speed up the development process by leveraging proven solutions, and improve code maintainability and scalability by promoting best practices such as loose coupling and high cohesion.
Write brief notes on abstract factory pattern.
Answer
The Abstract Factory Pattern provides an interface for creating families of related or dependent objects without specifying their concrete classes. It is a creational pattern that ensures the client code remains decoupled from the specific implementations of the objects it uses.
Key components include the Abstract Factory (declares creation methods), Concrete Factories (implement creation methods for specific families), Abstract Products (define interfaces for product types), and Concrete Products (implement the product interfaces). This pattern is particularly useful when a system must be independent of how its products are created, composed, and represented.
Discuss about implementation of composite pattern.
Answer
Sign in to view the complete answer paper.
Discuss the usage of chain of responsibility pattern.
Answer
Sign in to view the complete answer paper.
Explain the uses of visitor pattern.
Answer
Sign in to view the complete answer paper.
PART - B
Describe how the design patterns solve design problems.
Answer
Sign in to view the complete answer paper.
Discuss about design patterns in small talk MVC.
Answer
Sign in to view the complete answer paper.
Compare the factory method and prototype design patterns.
Answer
Sign in to view the complete answer paper.
Explain the structure, implementation and source code for the singleton patterns.
Answer
Sign in to view the complete answer paper.
Explain the usage of façade pattern with a suitable example.
Answer
Sign in to view the complete answer paper.
Explain the structure and implementation of decorator and proxy patterns.
Answer
Sign in to view the complete answer paper.
Compare the usage of Interpreter and Iterator patterns.
Answer
Sign in to view the complete answer paper.
Write the source code for mediator pattern. And explain its usage with a suitable example.
Answer
Sign in to view the complete answer paper.
Write the implementation and source code for state and strategy patterns.
Answer
Sign in to view the complete answer paper.
What we can expect from design patterns? Discuss about the history of design patterns.
Answer
Sign in to view the complete answer paper.