On This Page
This set of software design modeling (SDM) Multiple Choice Questions & Answers (MCQs) focuses on Software Design Modeling Set 6
Q1 | The __________ allows an object to alter its behavior when its internal state changes.
- abstract factory
- state pattern
- flyweight pattern
- adapter pattern
Q2 | In which of the following pattern, a null object replaces check of NULL object instance?
- state pattern
- null object pattern
- strategy pattern
- template pattern
Q3 | In which of the following pattern, a visitor class is used which changes the executing algorithm of an element class?
- visitor pattern
- mvc pattern
- business delegate pattern
- composite entity pattern
Q4 | Which of the following represents The (static) structure and (dynamic) behavior of the pattern?
- name
- application
- consequences
- form
Q5 | Which of the following is not one of the elements of a design pattern?
- context
- environment
- problem
- solution
Q6 | Define a family of algorithms, encapsulate each one, and make them interchangeable. It lets the algorithm vary independently from clients that use it.
- template method
- decorator
- strategy
- visitor
Q7 | Encapsulate a request as an object, there by letting you parametrize clients with different requests, queue or log requests, and support undoable operation.
- adapter
- command
- decorator
- composite
Q8 | Which design pattern is used in the Java Database connectivity JDBC(TM)?
- builder design pattern
- factory method design pattern
- abstract factory design pattern
- singletone design pattern
Q9 | Which design pattern you would you use to limit the class instantiation to one object?
- factory method design pattern
- builder design pattern
- prototype design pattern
- singleton design pattern
Q10 | Which of the following patterns allows multiple objects an opportunity to process a request without guaranteeing that any of them must process it?
- chain of responsibility
- command
- memento
- mediator
Q11 | 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?
- chain of responsibility
- strategy
- mediator
- memento
Q12 | 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
- strategy pattern
- factory pattern
- observer pattern
- adapter pattern
Q13 | Which GRASP pattern is suitbale to handle alternatives based on type?
- indirection
- pure fabrication
- polymorphism
- creator
Q14 | A concrete class must have ...........
- no program code for any of its methods
- program code for all of its methods
- program code for some of its methods
- no program code for some of its methods
Q15 | 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
- compostite
- decorator
- adapter
- observer
Q16 | The Proxy pattern deals with situations where you have a complex object or it takes a long time to create the object.
- true
- flase
Q17 | The main advantage of design patterns:
- provide proven solutions
- simplify complex problems
- improve communication
- all of above
Q18 | Which Design Pattern should you use when you want to parameterize objects by an action to perform.
- command
- prototype
- strategy
- builder
Q19 | Which Design Pattern should you use whenyou want to represent part-whole hierarchies of objects.
- composite
- iterator
- abstract factory
- flyweight
Q20 | 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.
- interpreter
- singleton
- facade
- composite
Q21 | 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.
- observer
- chain of responsibility
- decorator
- prototype
Q22 | Which GRASP pattern helps to find out answer for “Who should be responsible for creating a new instance of some class?
- adapter
- protected variations
- creator
- controller
Q23 | ___________ is a measure of how strongly one element is connected to, has knowledge of, or relies on other elements.
- coupling
- creator
- controller
- bonding
Q24 | A _____________ system is one in which each of its components has little or no knowledge of the definitions of other separate components.
- tightly coupled
- strong coupled
- loosely coupled
- weak coupled
Q25 | In Low coupling two elements are coupled, if ______________________.
- one element has aggregation/composition association with another element.
- one element implements/extends other element.
- both a&b
- none of above