JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech IV Year DESIGN PATTERNS Previous Question Paper (March - 2021 - R15)
Answer any Five Questions. All Questions Carry Equal Marks.
Main
Explain about the design pattern in Smalltalk MVC.
Answer
The Model-View-Controller (MVC) pattern, originally developed for the Smalltalk environment, is a foundational architectural pattern that separates an application into three interconnected components to manage complexity and promote code reuse. The Model represents the underlying data and business logic, maintaining the state of the application. It notifies its dependent views when its state changes. The View is the visual representation of the model, responsible for rendering the data to the user. It observes the model and updates itself automatically when the model changes. The Controller acts as the intermediary that accepts user input, such as mouse clicks or keyboard events, and translates them into commands for the model or view. By decoupling these roles, MVC allows multiple views to be attached to a single model and enables developers to modify the user interface without altering the core business logic.
Compare and contrast Class Inheritance versus Object Composition.
Answer
Class inheritance and object composition are two primary techniques for reusing functionality in object-oriented design. Class Inheritance (white-box reuse) allows a class to inherit properties and behaviors from a parent class at compile time. While it is simple to use and supported directly by programming languages, it leads to tight coupling because the subclass is dependent on the parent's implementation, making it difficult to change the parent class without affecting subclasses. In contrast, Object Composition (black-box reuse) involves assembling objects to achieve more complex functionality at runtime. It promotes loose coupling because the internal details of the composed objects are hidden behind their interfaces. Composition is more flexible as it allows behavior to be changed dynamically by swapping objects, whereas inheritance is static. The design principle of favor composition over inheritance is recommended to maintain a more modular and adaptable system architecture.
Discuss in detail Specification of Object Interfaces in Design patterns.
Answer
Sign in to view the complete answer paper.
Describe on detail about Document Structure.
Answer
Sign in to view the complete answer paper.
List and explain the Benefits of creational patterns.
Answer
Sign in to view the complete answer paper.
Discuss about structure and instantiation of singleton pattern.
Answer
Sign in to view the complete answer paper.
Draw and explain the Structure of BUILDERs.
Answer
Sign in to view the complete answer paper.
Discuss in detail Object Adapter Pattern and list the pros and cons of it.
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.
Explain the implementation of Pluggable Adapters with delegate objects.
Answer
Sign in to view the complete answer paper.
What are the applications of Flyweight Pattern? Explain the structure and participants of Flyweight pattern with suitable example.
Answer
Sign in to view the complete answer paper.
What is Command Pattern? Describe in detail about Structure, Participants and Collaborations of Command pattern.
Answer
Sign in to view the complete answer paper.
What is the Structure and Participants of Observer pattern?
Answer
Sign in to view the complete answer paper.
Write the History of the Design Patterns.
Answer
Sign in to view the complete answer paper.
List and explain the Benefits of using STATE pattern.
Answer
Sign in to view the complete answer paper.