Software Architecture Multiple Choice Questions on “Exploiting Patterns in Software Architecture”.
1. Which of the following are true for pattern?
a) It is a small collection of atomic units
b) They are ubiquitous throughout software development
c) All of the mentioned
d) None of the mentioned
Answer: c
Clarification: All of the mentioned are true.
2. Patterns are mostly used in which of the following?
a) Design in large
b) Design in Small
c) Coding
d) All of the mentioned
Answer: d
Clarification: All of the mentioned are used for patterns.
3. Which of the following can a pattern operate on?
a) Emphasize the solutions
b) Identify and name abstract
c) Provide a target for recognition
d) All of the mentioned
Answer: d
Clarification: All of the mentioned are the ways in which a pattern can operate.
4. What does emphasizing solution actually mean for patterns to operate?
a) Discovering patterns rather than inventing them
b) Serves as exemplars to programmers
c) All of the mentioned
d) None of the mentioned
Answer: a
Clarification: Emphasizing solution means discovering patterns rather than inventing them.
5. Which of the factors make a pattern portable?
a) Creating instances of some appropriate resource at run time
b) Presentation of two different user interface tool-kits
c) All of the mentioned
d) None of the mentioned
Answer: c
Clarification: All of the mentioned factors can be considered to make a pattern portable.
6. When there is a need to implement strategy pattern?
a) When a single task is implemented in variety of ways
b) When it is dependent on nature of inputs
c) All of the mentioned
d) None of the mentioned
Answer: c
Clarification: All of the mentioned ways are used to implement strategy pattern.
7. Which of the following is used in Decorator design pattern?
a) Broder Wrapper
b) Scroll Wrapper
c) Text View
d) All of the mentioned
Answer: d
Clarification: All of the mentioned are used in Decorator design pattern.
8. Which of the following is strategy pattern dependent on?
a) Scalability
b) Modifiability
c) Portability
d) Modifiability & Portability
Answer: d
Clarification: Strategy pattern is dependent on modifiability and portability.
9. Which of the following is for factory method behavioral characteristic?
a) Interpreter
b) Template method
c) Iterator
d) None of the mentioned
Answer: a
Clarification: Interpreter and Template method are for factory method.
10. How does a use of template allowed in components simplify things?
a) Reliability is enhanced
b) Coding time is increased
c) Testing is more complexed
d) All of the mentioned
Answer: a
Clarification: A template can enhance reliability, reduce coding time and simplify testing.
11. How is reliability enhanced when a template is allowed in component?
a) Once the template is incorrect, then templatized portion of every using component is correct
b) Once the template is correct, then templatized portion of every using component is correct
c) All of the mentioned
d) None of the mentioned
Answer: b
Clarification: Once the template is correct, then templatized portion of every using component is correct.
12. How is Testing simplified when a template is allowed in component?
a) Each component has a standard structure
b) Each component has a complex structure
c) All of the mentioned
d) None of the mentioned
Answer: a
Clarification: Testing is simplified when a template is allowed in component because each component has a standard structure that all paths testing can exploit.
13. How is Flexibility enhanced when a template is allowed in the component?
a) Conforming components are largely interchangeable
b) Conforming components are not largely interchangeable
c) All of the mentioned
d) None of the mentioned
Answer: a
Clarification: Flexibility is enhanced when a template is allowed in component because conforming component are largely interchangeable.