Design Pattern(Engineering > Computer Science And Engineering ) Questions and Answers
Question 1. Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. It lets subclasses redefine certain steps of an algorithm without changing the algorithm structure.
Chain of responsibility
Template method
Interpretor
Prototype
Explanation:-
Answer: Option B. -> Template method
Question 2. Which of the following pattern refers to creating duplicate object while keeping performance in mind?
Builder Pattern
Bridge Pattern
Prototype Pattern
Filter Pattern
Explanation:-
Answer: Option C. -> Prototype Pattern
Question 3. Which design pattern provides a single class which provides simplified methods required by client and delagates call to those methods?
Adapter pattern
Builder pattern
Facade pattern
Prototype pattern
Explanation:-
Answer: Option C. -> Facade pattern
Question 4. Which of the following Chooses and standardizes patterns for a problem domain promotes software reuse and, hence, quality and productivity?
Promoting Communication
Streamlining Documentation
Increasing Development Efficiency
Supporting Software Reuse
Explanation:-
Answer: Option D. -> Supporting Software Reuse
Question 5. 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
Explanation:-
Answer: Option A. -> Visitor Pattern
Question 6. Attach additional responsibilities to an object dynamically.It provides a flexible alternative to subclassing for extending functionality.
Chain of responsibility
Adapter
Decorator
Composite
Explanation:-
Answer: Option C. -> Decorator
Question 7. A pattern language
encompasses a collection of patterns
is implemented using hypertext
resembles the structure of natural languages
None of the above
Explanation:-
Answer: Option A. -> encompasses a collection of patterns
Question 8. Which of the following are levels of design focus that can be used to categorize WebApp patterns?
Behavioral patterns
Functional patterns
Layout patterns
Navigation patterns
Both b and d
Explanation:-
Answer: Option E. -> Both b and d
Question 9. Most user interface design patterns fall with in one of ____ categories of patterns.
5
10
25
100
Explanation:-
Answer: Option B. -> 10
Question 10. Which design pattern suggest multiple classes through which request is passed and multiple but only relevant classes carry out operations on the request?
Singleton pattern
Chain of responsibility pattern
State pattern
Bridge pattern
Explanation:-
Answer: Option B. -> Chain of responsibility pattern