0% found this document useful (0 votes)
2 views

ACSE0514-[Design Patterns] (1)

le madherchod quality

Uploaded by

shuklaankit45470
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

ACSE0514-[Design Patterns] (1)

le madherchod quality

Uploaded by

shuklaankit45470
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

.

Printed Page:- 04 Subject Code:- ACSE0514


Roll. No:

NOIDA INSTITUTE OF ENGINEERING AND TECHNOLOGY, GREATER NOIDA


(An Autonomous Institute Affiliated to AKTU, Lucknow)
B.Tech
SEM: V - THEORY EXAMINATION (2023 - 2024)
Subject: Design Patterns
Time: 3 Hours Max. Marks: 100
General Instructions:
IMP: Verify that you have received the question paper with the correct course, code, branch etc.
1. This Question paper comprises of three Sections -A, B, & C. It consists of Multiple Choice
Questions (MCQ’s) & Subjective type questions.
2. Maximum marks for each question are indicated on right -hand side of each question.
3. Illustrate your answers with neat sketches wherever necessary.
2 4
4. Assume suitable data if necessary.
5. Preferably, write the answers in sequential order.
2 0
6. No sheet should be left blank. Any written material after a blank sheet will not be
evaluated/checked.

SECTION A
C H 20

1. Attempt all parts:-

1-a. Patterns are important due to…(CO1)


A R 1

M
(a) They captured design accessible to novices and other experts
(b) They capture expert design knowledge

O P
(c) None of these
(d) All of these

1-b.
C
Select from the below author that is not a part of GOF (Gang of Four). (CO1)

(a) Richard Helm


1

(b) Gang Pattern


(c) Ralph Johnson
(d) Erich Gamma

1-c. Choose the correct statement about design patterns. (CO2) 1

(a) Design patterns represent the best practices used by experienced object-
oriented software developers.
(b) Design patterns are solutions to general problems that software

.
Page 1 of 4
.
developers faced during software development.
(c) Design patterns are obtained by trial and error by numerous software
developers over quite a substantial period of time.
(d) All of the above.

1-d. Which of the following is a generic structure that is extended to create a more 1
specific subsystem or application? (CO2)

(a) Software reuse


(b) Object-oriented programming language
(c) Frameworks
(d) None of the mentioned

1-e. Choose one of the pattern in which all the classes coupling is reduced(CO3) 1

(a) Iterator
(b) Facade

2 4
1-f.
(c) Mediator
(d) Proxy

Choose the from the following for Facade Pattern(CO3) 2 0 1

the collaboration
C H
(a) Interaction is begun by one of the collaborators or a client object outside

A R
(b) The object directs the collaboration, with all communication going
between it and the colleagues in the interactionAll of the mentioned
(c) All of the above

M
(d) None of the mentioned

1-g.

O
provided.(CO4)
P
Choose design pattern that works on data and action taken based on data 1

C(a) Command Pattern


(b) Singleton Pattern
(c) MVC Pattern
(d) Façade Pattern

1-h. The use of design patterns for the development of object-oriented software has 1
important implications for (CO4)

(a) Component Based Software Engineering


(b) Reusability in general
(c) All of the above
(d) None of the above
.
Page 2 of 4
.
1-i. Pattern prevents one from creating more than one instance of a variable(CO5) 1

(a) Factory Method


(b) Singleton
(c) Observer
(d) None of the mentioned

1-j. Choose one of the following are correct for copy constructor(CO5) 1

(a) A copy constructor is a constructor that takes an instance of its class as an


argument and creates a clone of its argument
(b) A copy constructor must be used when a final field must be set in creating
the clone because only a constructor can set a final field
(c) All of the mentioned
(d) None of the mentioned

2. Attempt all parts:-

2 4
2.a.

2.b. Write the difference between factory and builder pattern.(CO2)


2 0
Give differences between design principles and design patterns. (CO1) 2

2.c.

2.d.

2.e.
Write a short note on Adapter pattern.(CO3)

Elaborate the term Concrete Class.(CO 4)

C H
Does command design pattern provides extensibility ?(CO5)
2

3. Answer any five of the following:-


A R
SECTION B 30

3-a.
M
Explain the purpose and scope of the behavioural pattern.(CO1) 6

3-b.

3-c.
O P
Draw the catalogue of the Design patterns(CO1)

Write the goals of the document structure.(CO2)


6

3-d.

3.e. C
Mention specific problems builder pattern solves.(CO2)

In discussing the essence of the Decorator, it is said that “the structure is not
the pattern.” What does this mean? Why is this important? (CO3)
6

3.f. Write a java code to print diamond pattern.(CO4) 6

3.g. Discuss why access to the non-static variable is not allowed from static method 6
in Java. (CO5)

SECTION C 50

4. Answer any one of the following:-

4-a. Write the difference between Abstraction and Encapsulation in Java.(CO1) 10

4-b. Explain the selection process for the design pattern.(CO1) 10


.
Page 3 of 4
.
5. Answer any one of the following:-

5-a. Mention three examples of builder design pattern In java(CO2) 10

5-b. Define what is creational design patterns and Factory pattern.(CO2) 10

6. Answer any one of the following:-

6-a. Explain the two issues addressed by the composite design pattern(CO3) 10

6-b. Elaborate the consequence of applying the Composite pattern(CO3) 10

7. Answer any one of the following:-

7-a. Explain mediator and memento pattern. (CO4) 10

7-b. Show how to restore state of an object to previous state in Memento 10


Pattern.(CO4)

8. Answer any one of the following:-

8-a.

8-b.
Make a UML diagram of Template method. Explain how it works.(CO5)

2 4
Differentiate between State Design Pattern and Strategy Design Pattern. (CO5)
10

10

2 0
C H
A R
M
O P
C

.
Page 4 of 4

You might also like