Designing Building Blocks Flashcards
7 cards from real CPSA practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 Designing Building Blocks flashcards as text
Which diagram type in UML is most commonly used to show the static structure of building blocks and their relationships?
Answer: Component diagram
UML component diagrams depict building blocks, their interfaces, and the dependencies between them at a structural level.
The 'required interface' of a building block represents:
Answer: The services the block needs from other blocks to function
A required interface specifies which services from other building blocks are needed for the block to fulfill its responsibilities.
Which strategy BEST reduces the impact of change when a building block's implementation must be replaced?
Answer: Programming to interfaces rather than implementations
Programming to interfaces isolates consumers from implementation details, so replacing an implementation does not affect dependent blocks.
In a layered architecture, which rule governs how building blocks in different layers may interact?
Answer: Blocks may only depend on blocks in the same or lower layers
The layering rule requires that dependencies flow downward — a block may use blocks in the same layer or layers below it.
What is a 'facade' building block used for in software architecture?
Answer: To provide a simplified interface to a complex set of subsystems
A facade provides a unified, simplified interface to a complex subsystem, hiding its internal complexity from clients.
Which of the following BEST describes the concept of 'information hiding' in building block design?
Answer: Concealing implementation details behind a stable interface
Information hiding means implementation decisions are concealed behind an interface, limiting the impact of internal changes on other blocks.
When designing building blocks, why should circular dependencies be avoided?
Answer: They make blocks impossible to test or reuse independently
Circular dependencies bind blocks together so neither can be tested, replaced, or reused without the other, undermining modularity.