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

Software-Design-Modeling (Set 2)

Uploaded by

Girraj
Copyright
© © All Rights Reserved
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)
14 views

Software-Design-Modeling (Set 2)

Uploaded by

Girraj
Copyright
© © All Rights Reserved
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/ 22

Software Design Modeling (SDM)

2 of 5 sets

101. GRASP stands for _______________.


A. global responsibility assignment software patterns
B. general responsibility assignment software patterns
C. general responsibility assignment system patterns
D. general research assignment software patterns
Answer:B

102. There are _______ GRASP patterns.


A. 7
B. 8
o m
C. 9
. c
D. 10
te
Answer:C a
q M
c
103. ____________ object which receives request from UI layer object and then
M
controls/coordinates with other object.
A. main
B. controller
C. head
D. parent
Answer:B

104. Controller class is called _____________, if the class is overloaded with too
many responsibilities.
A. overload
B. bloated
C. full
D. overflow
Answer:B

105. Benefit of ______________ is handling new variations will become easy.


A. cohesion
B. coupling
C. polymorphism
D. inheritance
Answer:C

106. Benefit of Pure Fabrication is _______________


A. high cohesion
B. low coupling
C. class reuse
D. all of above
Answer:D

107. A ___________ is a class that does not represent a concept in the problem
domain.
A. indirection
B. information expert
C. pure fabrication
D. protected variations
Answer:C

108. Type of design patterns that provide solution for the better interaction
between objects is ______________
A. creational
B. structural
C. behavioral
D. none of above
Answer:C

109. Which design pattern provides a single class which provides simplified
methods required by client and delegates call to those methods?
A. adapter pattern
B. builder pattern
C. facade pattern
D. prototype pattern
Answer:C

View all MCQ's at McqMate.com


110. Which design pattern ensures that only one object of particular class gets
created?
A. singleton pattern
B. filter pattern
C. state pattern
D. bridge pattern
Answer:A

111. Which design pattern suggests multiple classes through which request is
passed and multiple but only relevant classes carry out operations on the request?
A. singleton pattern
B. chain of responsibility pattern
C. state pattern
D. bridge pattern
Answer:C

112. Which design pattern works on data and action taken based on data
provided?
A. command pattern
B. singleton pattern
C. mvc pattern
D. facade pattern
Answer:A

113. Facade pattern promotes weak coupling between subsystem and its clients.
A. true
B. false
Answer:A

114. Which of the following are levels of design focus that can be used to categorize
WebApp patterns?
A. behavioral patterns
B. functional patterns
C. navigation patterns
D. both a &c
Answer:D

View all MCQ's at McqMate.com


115. Which one pattern creating duplicate object?
A. filter pattern
B. prototype pattern
C. bridge pattern
D. builder pattern
Answer:B

116. In which of the following pattern, a visitor class is used which changes the
executing algorithm of an element class?
A. visitor pattern
B. mvc pattern
C. business delegate pattern
D. composite entity pattern
Answer:A

117. A pattern language ______________


A. encompasses a collection of patterns
B. is implemented using hypertext
C. resembles the structure of natural languages
D. none of above
Answer:A

118. Most user interface design patterns fall with in one of ____ categories of
patterns.
A. 5
B. 10
C. 25
D. 100
Answer:B

119. The ___________used to ease the construction of a complex object from


simple objects.
A. builder pattern
B. construct pattern
C. create pattern
D. none of above

View all MCQ's at McqMate.com


Answer:A

120. The ___________ is used to translate the interface of one class into another
interface.
A. facade pattern
B. builder pattern
C. prototype pattern
D. adapter pattern
Answer:D

121. ________________ makes a clear-cut between abstraction and


implementation.
A. facade pattern
B. builder pattern
C. prototype pattern
D. bridge pattern
Answer:D

122. The _____________ helps you to create tree structures of objects.


A. builder pattern
B. composite pattern
C. flyweight pattern
D. mediator pattern
Answer:B

123. Scope based classification decided if the pattern applies to mainly classes or
objects.
A. true
B. false
Answer:A

124. Use ___________ when you need to define a family of algorithms, encapsulate
each one, and make them interchangeable.
A. state pattern
B. abstract factory
C. strategy pattern

View all MCQ's at McqMate.com


D. singleton pattern
Answer:C

125. The __________ allows an object to alter its behavior when its internal state
changes.
A. abstract factory
B. state pattern
C. flyweight pattern
D. adapter pattern
Answer:B

126. In which of the following pattern, a null object replaces check of NULL object
instance?
A. state pattern
B. null object pattern
C. strategy pattern
D. template pattern
Answer:B

127. In which of the following pattern, a visitor class is used which changes the
executing algorithm of an element class?
A. visitor pattern
B. mvc pattern
C. business delegate pattern
D. composite entity pattern
Answer:A

128. Which of the following represents The (static) structure and (dynamic)
behavior of the pattern?
A. name
B. application
C. consequences
D. form
Answer:D

129. Which of the following is not one of the elements of a design pattern?

View all MCQ's at McqMate.com


A. context
B. environment
C. problem
D. solution
Answer:D

130. Define a family of algorithms, encapsulate each one, and make them
interchangeable. It lets the algorithm vary independently from clients that use it.
A. template method
B. decorator
C. strategy
D. visitor
Answer:C

131. Encapsulate a request as an object, there by letting you parametrize clients


with different requests, queue or log requests, and support undoable operation.
A. adapter
B. command
C. decorator
D. composite
Answer:B

132. Which design pattern is used in the Java Database connectivity JDBC(TM)?
A. builder design pattern
B. factory method design pattern
C. abstract factory design pattern
D. singletone design pattern
Answer:B

133. Which design pattern you would you use to limit the class instantiation to one
object?
A. factory method design pattern
B. builder design pattern
C. prototype design pattern
D. singleton design pattern
Answer:D

View all MCQ's at McqMate.com


134. Which of the following patterns allows multiple objects an opportunity to
process a request without guaranteeing that any of them must process it?
A. chain of responsibility
B. command
C. memento
D. mediator
Answer:A

135. Which of the following is an object pattern that encapsulates interchangeable


algorithms in objects so the algorithm can vary independently of the classes that
use it?
A. chain of responsibility
B. strategy
C. mediator
D. memento
Answer:B

136. A pattern that is intended to provide a means to define a family of algorithms


and encapsulate each one as an object for interchangeable use
A. strategy pattern
B. factory pattern
C. observer pattern
D. adapter pattern
Answer:A

137. Which GRASP pattern is suitbale to handle alternatives based on type?


A. indirection
B. pure fabrication
C. polymorphism
D. creator
Answer:C

138. A concrete class must have ...........


A. no program code for any of its methods
B. program code for all of its methods
C. program code for some of its methods

View all MCQ's at McqMate.com


D. no program code for some of its methods
Answer:B

139. It is also known as Wrapper, it is used when subclassing is not possible or


practical to add functionality and it is used to add functionality at runtime. This
pattern is
A. compostite
B. decorator
C. adapter
D. observer
Answer:B

140. The Proxy pattern deals with situations where you have a complex object or it
takes a long time to create the object.
A. true
B. flase
Answer:A

141. The main advantage of design patterns:


A. provide proven solutions
B. simplify complex problems
C. improve communication
D. all of above
Answer:D

142. Which Design Pattern should you use when you want to parameterize objects
by an action to perform.
A. command
B. prototype
C. strategy
D. builder
Answer:A

143. Which Design Pattern should you use whenyou want to represent part-whole
hierarchies of objects.
A. composite

View all MCQ's at McqMate.com


B. iterator
C. abstract factory
D. flyweight
Answer:A

144. Which Design Pattern should you use when an application uses a large
number of objects and the storage costs are high because of the sheer quantity of
objects.
A. interpreter
B. singleton
C. facade
D. composite
Answer:D

145. Which Design Pattern should you use when more than one object may handle
a request, and the handler isn't known a priori. The handler should be ascertained
automatically.
A. observer
B. chain of responsibility
C. decorator
D. prototype
Answer:B

146. Which GRASP pattern helps to find out answer for “Who should be
responsible for creating a new instance of some class?"
A. adapter
B. protected variations
C. creator
D. controller
Answer:C

147. ___________ is a measure of how strongly one element is connected to, has
knowledge of, or relies on other elements.
A. coupling
B. creator
C. controller

View all MCQ's at McqMate.com


D. bonding
Answer:A

148. A _____________ system is one in which each of its components has little or no
knowledge of the definitions of other separate components.
A. tightly coupled
B. strong coupled
C. loosely coupled
D. weak coupled
Answer:C

149. In Low coupling two elements are coupled, if ______________________.


A. one element has aggregation/composition association with another element.
B. one element implements/extends other element.
C. both a&b
D. none of above
Answer:C

150. We can make an object as Controller, if ___________________


A. object represents the overall system
B. object represent a use case, handling a sequence of operations
C. both a&b
D. none of above
Answer:C

151. A good software will have _____________.


A. high cohesion
B. low coupling
C. both a&b
D. none of above
Answer:C

152. The indirection pattern supports _____________


A. low coupling
B. reuse
C. both a&b

View all MCQ's at McqMate.com


D. none of above
Answer:C

153. Which design pattern defines one-to-many dependency among objects?


A. singleton pattern
B. facade pattern
C. observer pattern
D. factory method pattern
Answer:C

154. Which of the following is correct about Factory design pattern.


A. this type of design pattern comes under creational pattern.
B. factory pattern creates object without exposing the creation logic to the client.
C. factory pattern refers to newly created object using a common interface.
D. all of the above
Answer:D

155. Attach additional responsibilities to an object dynamically.It provides a


flexible alternative to subclassing for extending functionality.
A. chain of responsibility
B. adapter
C. decorator
D. composite
Answer:C

156. Which of the following describes the Facade pattern correctly?


A. this pattern allows a user to add new functionality to an existing object without altering its
structure
B. this pattern is used where we need to treat a group of objects in similar way as a single object
C. this pattern hides the complexities of the system and provides an interface to the client using
which the client can access the system
D. this pattern is primarily used to reduce the number of objects created and to decrease memory
footprint and increase performance
Answer:C

View all MCQ's at McqMate.com


157. The use of design patterns for the development of object-oriented software has
important implications for ____________
A. component-based software engineering
B. reusability in general
C. all of the above
D. none of above
Answer:C

158. In which of the following pattern a class represents functionality of another


class?
A. proxy pattern
B. chain of responsibility pattern
C. command pattern
D. interpreter pattern
Answer:A

159. The client software uses the ___________ which provides an interface for
creating families related or dependent objects.
A. constant factory
B. abstract factory
C. full factory
D. intermediate factory
Answer:B

160. Which pattern is used when configuring an application with classes


dynamically.
A. facade pattern
B. builder pattern
C. prototype pattern
D. bridge pattern
Answer:C

161. ___________ pattern ensure a class only has one instance and provide a global
point of access to it.
A. singleton pattern
B. filter pattern

View all MCQ's at McqMate.com


C. state pattern
D. bridge pattern
Answer:A

162. The ____________ is often employed when there is a need to use different sets
of objects and where the objects could be added or changed some time during the
lifetime of an application.
A. abstract factory
B. singleton pattern
C. builder pattern
D. prototype pattern
Answer:A

163. Which pattern is used When an object wants to publish information and many
objects will need to receive that information.
A. publisher pattern
B. brodcast pattern
C. observer pattern
D. none of above
Answer:C

164. A ___________ is an object that stores a snapshot of the internal state of


another object.
A. observer
B. memento
C. create
D. none of above
Answer:B

165. Which of the following describes the Command pattern correctly?


A. in this pattern a class represents functionality of another class.
B. this pattern creates a chain of receiver objects for a request.
C. this pattern provides a way to evaluate language grammar or expression.
D. in this pattern a request is wrapped under an object as command and passed to invoker
object.
Answer:D

View all MCQ's at McqMate.com


166. Which design pattern provides a single class which provides simplified
methods required by client and delagates call to those methods?
A. adapter pattern
B. builder pattern
C. facade pattern
D. prototype pattern
Answer:C

167. Which of the following Chooses and standardizes patterns for a problem
domain promotes software reuse and, hence, quality and productivity?
A. promoting communication
B. streamlining documentation
C. increasing development efficiency
D. supporting software reuse
Answer:D

168. Which design pattern suggest multiple classes through which request is passed
and multiple but only relevant classes carry out operations on the request?
A. singleton pattern
B. chain of responsibility pattern
C. state pattern
D. bridge pattern
Answer:B

169. Which of the following are levels of design focus that can be used to categorize
WebApp patterns?
A. behavioral patterns
B. visitor pattern
C. navigation patterns
D. layout patterns
Answer:C

170. Which pattern is most appropriate when a decision must be made at the time
a class is instantiated?
A. bridge
B. composite

View all MCQ's at McqMate.com


C. factory method
D. command
Answer:C

171. It is also known as Virtual Constructor and it is used to define an interface for
creating an object but letting the subclass decide which class to instantiate, this
pattern is :
A. builder
B. abstract factory
C. prototype
D. factory method
Answer:D

172. You want all the clients using class A to use the same instance of class A, what
should you do to achieve this goal?
A. mark class a final
B. mark class a abstract
C. apply the singleton pattern to class a
D. apply the memento pattern to class a
Answer:C

173. Which design pattern you would you use to have a prototypical instance
determine the concrete class of object being created?
A. prototype factory design pattern
B. virtual prototype design pattern
C. abstract prototype design pattern
D. prototype design pattern
Answer:D

174. Which design pattern you would you use to decouple the creation procedure of
a complex object from it's concrete instance to be able to apply that procedure on
variety of implementations.
A. factory builder design pattern
B. method builder design pattern
C. builder design pattern
D. factory method design pattern

View all MCQ's at McqMate.com


Answer:C

175. What would lead you to apply the builder design pattern?
A. to abstract steps of construction of objects so that different implementations
B. to apply the same object construction procedure on variety of representations
C. both 1 & 2
D. none of above
Answer:C

176. To implement the Singleton design pattern specify all the needed steps ............
A. add final modifier to the class declaration
B. add private or protected modifier to the constructor declaration
C. introduce a static getter method for the singleton instance
D. all of above
Answer:D

177. Which design pattern you would you use to control the creation of an object
based on a established interface, while allowing the concrete implementation to
determine the subclass to construct.
A. singleton design pattern
B. builder factory design pattern
C. prototype factory design pattern
D. factory method design pattern
Answer:D

178. The factory method design pattern is also known as:


A. abstract factory
B. abstract constructor
C. virtual factory
D. virtual constructor
Answer:D

179. Which of the following are participants in the GOF builder design pattern?
A. creator
B. refined abstraction
C. abstract factory

View all MCQ's at McqMate.com


D. none of above
Answer:A

180. Which design pattern is used in the Java InputStream and OutputStream
hierarchies?
A. adapter design pattern
B. decorator design pattern
C. composite design pattern
D. singleton design pattern
Answer:B

181. What object should have the responsibility, when you do not want to violate
High Cohesion and Low Coupling, or other goals, but solutions offered by Expert
are not appropriate?
A. pure fabrication
B. indirection
C. creator
D. polymorphism
Answer:A

182. In the Publish-Subscribe messaging model, the subscribers register themselves


in a topic and are notified when new messages arrive to the topic. Which pattern
does most describe this model?
A. adapter
B. notifier
C. observer
D. factory
Answer:C

183. When would you use the GOF Decorator design pattern?
A. to translates an existing class interface into a compatible target interface
B. to assign more functionality to an object without sub-classing it
C. to decouple an abstraction from its implementation so that the two can vary independently
D. to nest layers of decorators to add more functionality
Answer:B

View all MCQ's at McqMate.com


184. When would you use the GOF Composite design pattern?
A. to decouple an abstraction from its implementation so that the two can vary independently
B. to translates an existing class interface into a compatible target interface
C. to arrange object hierarchies such that the client code can access both the individual objects
and compositions in a uniform manner
D. to improve the system overall performance
Answer:C

185. What are the advantages of Factory objects?


A. separate the responsibility of complex creation into cohesive helper objects.
B. hide potentially complex creation logic.
C. allow introduction of performance-enhancing memory management strategies, such as object
caching or recycling.
D. all of above
Answer:D

186. Classes that contain strongly related functionalities are described as having
____________.
A. high cohesion
B. high coupling
C. strong cohesion
D. none of above
Answer:A

187. You want to minimize development cost by reusing methods? Which design
pattern would you choose?
A. adapter pattern
B. singleton pattern
C. delegation pattern
D. immutable pattern
Answer:C

188. Can We Create A Clone Of A Singleton Object?


A. true
B. false

View all MCQ's at McqMate.com


Answer:A

189. Which of the following describes the Builder pattern correctly?


A. this pattern builds a complex object using simple objects and using a step by step approach.
B. this pattern refers to creating duplicate object while keeping performance in mind.
C. this pattern is used when creation of object directly is costly.
D. this pattern is used when we need to decouple an abstraction from its implementation so that
the two can vary independently.
Answer:A

190. Which of the following describes the MVC pattern correctly?


A. in this pattern, a visitor class is used which changes the executing algorithm of an element
class.
B. this pattern is used to separate application\s concerns.
C. this pattern is used to decouple presentation tier and business tier.
D. this pattern is used in ejb persistence mechanism.
Answer:B

191. Which of the following is correct about Structural design patterns.


A. these design patterns are specifically concerned with communication between objects.
B. these design patterns concern class and object composition. concept of inheritance is used to
compose interfaces and define ways to compose objects to obtain new functionalities.
C. these design patterns provide a way to create objects while hiding the creation logic, rather
than instantiating objects directly using new opreator.
D. none of the above.
Answer:B

192. Which of the following describes the Filter pattern correctly?


A. this pattern builds a complex object using simple objects and using a step by step approach.
B. this pattern refers to creating duplicate object while keeping performance in mind.
C. this pattern enables developers to filter a set of objects using different criteria and chaining
them in a decoupled way through logical operations.
D. this pattern is used when we need to decouple an abstraction from its implementation so that
the two can vary independently.
Answer:B

View all MCQ's at McqMate.com


193. Which of the following describes the Flyweight pattern correctly?
A. this pattern allows a user to add new functionality to an existing object without altering its
structure.
B. this pattern is used where we need to treat a group of objects in similar way as a single object.
C. this pattern is primarily used to reduce the number of objects created and to decrease memory
footprint and increase performance.
D. this pattern hides the complexities of the system and provides an interface to the client using
which the client can access the system.
Answer:C

194. Which of the following describes the Behavioral pattern correctly?


A. this type of patterns provide a way to create objects while hiding the creation logic, rather than
instantiating objects directly using new opreator
B. this type of patterns concern class and object composition. concept of inheritance is used to
compose interfaces and define ways to compose objects to obtain new functionalities.
C. this type of pattern are specifically concerned with communication between objects.
D. this type of pattern are specifically concerned with the presentation tier.
Answer:C

195. Given the following scenario: You want to create families of related objects, to
be used interchangeably to configure you application. What is most appropriate
GoF pattern to use?
A. chain of responsibility
B. abstract factory
C. builder
D. observer
Answer:B

196. What are the consequences of applying the GOF Singleton pattern?
A. it introduces thread safety issue when the singleton instance is instantiated on demand
B. the client code can creates multiple instances at run time
C. it reduces of the class hierarchy as compared to the other factory design patterns
D. it makes it easier for a certain family of objects to work together
Answer:A

197. What are the consequences of applying the abstract factory patter?

View all MCQ's at McqMate.com


A. it will be much easier to introduce new family of products
B. it makes it easier for a certain family of objects to work together
C. it makes the designed product families exchangeable
D. both 2 & 3
Answer:D

198. Which GOF design pattern is applied in the code snippet below?
public class PrintSpooler {
private static final PrintSpooler INSTANCE = new PrintSpooler();
private PrintSpooler() {}
public static PrintSpooler getInstance() {
return INSTANCE;
}
}
A. printspooler design pattern
B. singleton design pattern
C. factory design pattern
D. abstract singleton design pattern
Answer:B

199. What is a software architectural pattern?


A. the structure of the major subsystems of a system
B. the components and connectors in a software architecture
C. a small group of collaborating objects
D. a recurring architecture used in a variety of systems
Answer:D

200. Which of the following term is best defined by the statement:”The client
sends structured query language (SQL) requests to the server which are
transmitted as messages across the net”?
A. file servers
B. database servers
C. client servers
D. high end servers
Answer:B

View all MCQ's at McqMate.com

You might also like