0% found this document useful (0 votes)
176 views4 pages

May 09DESIGNPATTERNS

This document contains questions from a design patterns exam for a university course. It includes questions about: 1. The definition and essential elements of a design pattern. 2. How design patterns can solve problems like encapsulating formatting in a document editor. 3. The structure and implementation of common design patterns like Factory Method, Bridge, and others.

Uploaded by

Sai Laxmanand
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
176 views4 pages

May 09DESIGNPATTERNS

This document contains questions from a design patterns exam for a university course. It includes questions about: 1. The definition and essential elements of a design pattern. 2. How design patterns can solve problems like encapsulating formatting in a document editor. 3. The structure and implementation of common design patterns like Factory Method, Bridge, and others.

Uploaded by

Sai Laxmanand
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

www.jntuworld.

com

Code No: R05421205


SET-1
JAWAHARLAL NEHRU TECHNOLOGY UNIVERSITY, HYDERABAD
R05 IV B.Tech. II Semester Regular Exams, April/May – 2009
DESIGN PATTERNS
(Common to Information Technology, Computer Science and Systems Engineering)

Time: 3 hours Max. Marks.80


Answer any Five questions
All questions carry equal marks
---
1. What is a design pattern and what are its four essential elements? 16

2. Explain how encapsulating the formatting problem of document editor can be


solved using design patterns. 16

L D
3. Draw the class diagram and explain the collaboration, with sample code, of
different classes in the creational design pattern that helps in creation of families
of related or dependent objects without specifying their concrete classes. 16

R
4. a. How do you design an application with classes that have incompatible

O
interfaces? Explain, briefly, with class diagram. 4
b. How do you design an application where the implementation of an abstraction

U W
is likely to change subsequently? Explain, briefly, with class diagram. 4
c. Explain the implementation issues of a design with recursive composition of
objects such as tree structures. 8

T
5. Explain, with a text editor example, how you design an application with a class
whose responsibilities dynamically change. Draw the class diagram and explain.

N
Discuss the implementation issues briefly. 16

J
6. How do you design the software when more than one object may handle a request
and the handler is not a priori? Draw the class diagram and explain with an
example. Discuss the consequence and implementation issues briefly. 16
7. a. Explain the structure of Mediator design pattern with a class diagram and
discuss the collaboration with a sequence diagram. 8
b. Discuss the consequences and implementation issues of Memento design
pattern. 8
8. Discuss the several ways the design patterns affect the way object oriented
software is designed. 16

www.jntuworld.com
www.jntuworld.com

Code No: R05421205


SET-2
JAWAHARLAL NEHRU TECHNOLOGY UNIVERSITY, HYDERABAD
R05 IV B.Tech. II Semester Regular Exams, April/May – 2009
DESIGN PATTERNS
(Common to Information Technology, Computer Science and Systems Engineering)

Time: 3 hours Max. Marks.80


Answer any Five questions
All questions carry equal marks
---
1. Explain how we describe design patterns. 16

2. Explain how design patterns provide solution for portability onto diversified
platforms with different look-and-feel standards. 16

D
3. Explain the structure of builder design pattern with class diagram and describe the

L
collaboration with a sequence diagram. Explain its applicability to document
format conversion application with class diagram. 16

4. a.
b.
c.
When do you use Bridge pattern? R
Briefly describe the consequences of Adapter design pattern

O
What are the implementation considerations of Bridge pattern
4
4
4
d.

U W
What are consequences of Composite pattern?

5. How do you provide a uniform interface to a set of interfaces in a subsystem?


4

T
Explain with an example of compiler. Draw the class diagram and discuss
implementation issues. 16

J N
6. It is required to design the software for a server in Election Commission with the
following requirements. Any voter should be able to register and modify the
personal details. The voter should be able to request election schedules,
candidates of particular constituency, their bio-data, address of the polling booths,
etc. The server should queue the requests and execute them. The voter should be
able undo the changes. Design the software with suitable design pattern and
explain with a class diagram. Discuss the collaborations. 16

7. a. What is a Change Manager and explain the structure with a class diagram. 8
b. Explain the State design pattern with an example from TCP connection
example. 8

8. Discuss the following aspects of behavioral patterns briefly: 4x4


a. Encapsulating variation
b. Objects as Arguments
c. Should communication be encapsulated or distributed?
d. Decoupling senders and receivers.

www.jntuworld.com
www.jntuworld.com

Code No: R05421205 SET-3


JAWAHARLAL NEHRU TECHNOLOGY UNIVERSITY, HYDERABAD
R05 IV B.Tech. II Semester Regular Exams, April/May – 2009
DESIGN PATTERNS
(Common to Information Technology, Computer Science and Systems Engineering)

Time: 3 hours Max. Marks.80


Answer any Five questions
All questions carry equal marks
---

1. a. Compare and contrast class inheritance and interface inheritance 4


b. Explain the advantages of programming to an interface over programming to
an implementation. 4
c. What is the difference between white-box reuse and black-box reuse? 4
d. Compare Inheritance versus parameterized types.

L D 4

2. How can the textual analysis problem of document editor be solved using design

3.
patterns?

O R 16

Explain the implementation issues of Factory Method with sample code. 16

W
4. What are the applications of Bridge pattern? Explain the structure of Bridge
pattern with Window system example.

U
16

T
5. Explain the structure of flyweight design pattern with a class diagram. Give an
example from text editor. Discuss the consequences and implementation issues.

N
16

J
6. A reputed software company is developing CAD software. It is required that the
software should read licenses details, number of simultaneous users, permitted
features, etc., from a configuration file with a specific syntax. Design the software
with suitable design pattern and explain with a class diagram. Briefly discuss the
consequences and implementation issues. 16

7. a. Explain the structure of Strategy design pattern with a class diagram and briefly
discuss its benefits and drawbacks. 8
b. Discuss the consequences and implementation issues of Template Method
design pattern 8

8. Explain the steps involved in selecting a design pattern. 16

www.jntuworld.com
www.jntuworld.com

Code No: R05421205 SET-4


JAWAHARLAL NEHRU TECHNOLOGY UNIVERSITY, HYDERABAD
R05 IV B.Tech. II Semester Regular Exams, April/May – 2009
DESIGN PATTERNS
(Common to Information Technology, Computer Science and Systems Engineering)

Time: 3 hours Max. Marks.80


Answer any Five questions
All questions carry equal marks
---

1. Explain briefly common causes of redesign along with the design patterns that
address them. 16

L D
2. How can the user operations be handled in the design of document editor? 16
3. Explain the class design structure of an editor for music scores with suitable

R
design pattern and discuss the implementation issues. 16
4. a. What is the problem with adapters and how can Two-way adapters solve the
problem?
O 4

U W
b. Explain Composite pattern with an example from drawing editor. 12
5. Consider a system which receives data from different sensors and displays the

T
results after processing the data. Design the software with suitable design pattern,
if the software has to provide a controlled access to the sensors. Discuss the

J N
consequences and implementation issues briefly.
6. Discuss the implementation issues of Iterator.
7. a. Explain the collaborations and consequences of Visitor design pattern. 8
16
16

b. Discuss how decoupling of senders and receivers is achieved in different design


patterns. 8
8. Discuss the several ways the design patterns affect the way object oriented
software is designed. 16

www.jntuworld.com

You might also like