Software Design Multiple Choice Questions on “Layered Architectures”.
1. Which of the following is incorrect?
a) A Layered-style program is divided into an array of modules or layers
b) Each layer provides services to the layer “below” and makes use of services provided by the layer “above”
c) All of the mentioned
d) None of the mentioned
Answer: b
Clarification: Each layer provides services to the layer “above” and makes use of services provided by the layer “below”.
2. Which of the following is correct?
a) The dynamic structure of the Layered style is to partition software units into modular layers
b) The static structure of the Layered style is nothing more than a constraint on interactions between layers
c) All of the mentioned
d) None of the mentioned
Answer: d
Clarification: The static structure of the Layered style is to partition software units into modular layers whereas The dynamic structure of the Layered style is nothing more than a constraint on interactions between layers.
3. What is Relaxed Layered Style?
a) Each layer can be constrained to use only the layer directly below it
b) Sometimes this constraint is relaxed slightly to allow each layer to use all the layers below it
c) All of the mentioned
d) None of the mentioned
Answer: b
Clarification: Each layer can be constrained to use only the layer directly below it—this is a Strict Layered style whereas Sometimes this constraint is relaxed slightly to allow each layer to use all the layers below it—this is a Relaxed Layered style.
4. Which of the following is correct?
a) Module A uses Module B if a correct version of B must be present for A to execute correctly
b) Module A calls (or invokes ) module B if B triggers execution of A
c) All of the mentioned
d) None of the mentioned
Answer: a
Clarification: Module A uses Module B if a correct version of B must be present for A to execute correctly and Module A calls (or invokes ) module B if A triggers execution of B.
5. Which of the following is true with respect to layered architecture?
a) Each layer is allowed to depend on the layer above it being present and correct
b) A layer may call other layers above and below it, as long as it uses them
c) All of the mentioned
d) None of the mentioned
Answer: d
Clarification: Each layer is allowed to depend on the layer below it being present and correct. A layer may call other layers above and below it, as long as it does not use them.
6. What is Onion diagram illustrates?
a) It illustrates the connection between the layers in communications protocols, such as the International Standards Organization Open Systems Interconnection (ISO OSI) model,or the layers in user interface and windowing systems, such as the X Window System
b) It often illustrates operating system layers, with the kernel at the core
c) All of the mentioned
d) None of the mentioned
Answer: d
Clarification: Onion diagram illustrates operating system layers, with the kernel at the core.
7. In particular, layers have which of the following characteristics?
a) Layers are by definition highly cohesive, thus satisfying the Principle of Cohesion
b) Layers doesn’t support information hiding
c) Layers are constrained to use only above layers
d) All of the mentioned
Answer: a
Clarification: Layers are by definition highly cohesive, thus satisfying the Principle of Cohesion. Layers support information hiding Layers are constrained to use only lower layers.
8. Which of the following is incorrect?
a) Layered architectures are highly changeable, so this pattern can be used when changeability is an important quality attribute
b) Layered-style programs are easy to modify because changes can be made to a layer independently of the rest of the program
c) All of the mentioned
d) None of the mentioned
Answer: d
Clarification: All of the mentioned are correct.
9. What are the drawbacks for Layers?
a) It is often necessary to pass data through many layers, which can slow performance significantly
b) Layers support information hiding
c) Multi-layered programs can be hard to debug because operations tend to be implemented through a series of calls across layers
d) None of the mentioned
Answer: c
Clarification: Layers support information hiding is an advantage and not a drawback.
10. Which of the following is correct?
a) Layers are not strongly coupled to the layers above them
b) Each layer is strongly coupled only to the layer immediately below it
c) Overall Layered-style architectures are loosely coupled
d) All of the mentioned
Answer: d
Clarification: Layers are not strongly coupled to the layers above them. If a program uses theStrict Layered style, then each layer is strongly coupled only to the layer immediately below it. As a result, overall Layered-style architectures are loosely coupled.