Top 350+ Solved software design modeling (SDM) MCQ Questions Answer
Q. 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
Q. 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
Q. 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
Q. Which of the following represents The (static) structure and (dynamic) behavior of the pattern?
a. name
b. application
c. consequences
d. form
Q. Which of the following is not one of the elements of a design pattern?
a. context
b. environment
c. problem
d. solution
Q. 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
Q. 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
Q. 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
Q. 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
Q. 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
Q. 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
Q. 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
Q. Which GRASP pattern is suitbale to handle alternatives based on type?
a. indirection
b. pure fabrication
c. polymorphism
d. creator
Q. 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
d. no program code for some of its methods
Q. 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