A team should apply design principles as practical guides and weigh them against the system’s goals and constraints, rather than treating them as absolute rules.
6 Software Design Principles Online Quiz Questions
Use this free practice quiz with 20 questions to review 6 Software Design Principles, test your knowledge, and prepare for your next test or exam.
A well-designed system should eliminate all communication and dependencies between its modules.
- A
True
- B
False
A checkout component needs to charge customers, and the team wants to be able to replace its payment provider without rewriting checkout logic. Which design best supports that goal?
- A
Checkout directly imports and calls the current provider’s internal implementation.
- B
Checkout depends on a payment interface that different providers can implement.
- C
Checkout duplicates each provider’s charging logic in its own methods.
- D
Checkout stores provider-specific behavior in unrelated user-interface code.
A module has one clear purpose, and its responsibilities closely relate to one another. What design quality does this describe?
A component is described in terms of what it offers, while details that its users do not need are left out. This is .
A system’s interface code, business rules, and data-storage logic are tangled together. Which redesign most directly applies separation of concerns?
- A
Separate user interaction, business rules, and data storage into distinct places.
- B
Put user interaction, business rules, and data storage into one module so they are easy to find.
- C
Copy business rules into each module that needs them.
- D
Expose each module’s internal decisions so other modules can use them.
A team wants developers to understand module boundaries and make changes with fewer unintended effects. Select all practices that support this goal.
- A
Keep interfaces focused on the behavior callers need.
- B
Expose all internal state so callers can adapt to implementation changes.
- C
Make dependencies explicit instead of relying on hidden shared state.
- D
Combine unrelated responsibilities into a single module to reduce the number of modules.
A module keeps its internal decisions private and exposes only what other modules need. What design principle is being applied?
A useful general design aim is within modules and between them.
A team is considering several layers of flexibility for a feature with no current requirement for them. Which choice best applies the principle of keeping a design as simple as the problem allows?
- A
Add several abstraction layers now so that any imaginable future feature can be supported.
- B
Combine similar-looking code even when it serves unrelated purposes.
- C
Choose the clearest design that meets current needs, adding flexibility when a real requirement calls for it.
- D
Expose implementation details so future changes can be made from any module.
A change to one module repeatedly forces unrelated modules to change. Select all design choices that can help reduce unnecessary coupling.
- A
Have higher-level rules rely on stable contracts rather than specific implementation details.
- B
Keep internal decisions private and expose only what other modules need.
- C
Increase the number of modules, regardless of whether their boundaries help.
- D
Make connections between modules intentional and manageable.
An order-processing module validates orders, sends marketing emails, and formats reports. A change to report formatting has repeatedly caused problems in order validation. Propose a redesign and explain how it would improve maintainability without assuming that all dependencies can be eliminated.
A change to one behavior in a module often requires edits to several unrelated behaviors in that same module. Which design principle most directly addresses this problem?
- A
Keep every behavior in one module so the system has fewer boundaries.
- B
Give each module one coherent purpose, so a change does not require editing unrelated behaviors.
- C
Duplicate the same rule in each module that needs it.
- D
Make every module depend directly on the internal details of every other module.
A checkout component needs to charge a customer. Which design concept lets it rely on a payment capability without knowing how a particular provider implements it?
- A
Information hiding
- B
Abstraction
- C
Cohesion
- D
Separation of concerns
Which module has the clearest single purpose and the most closely related responsibilities?
- A
A module that validates orders, sends marketing emails, and formats reports
- B
A module that handles user sign-in and generates unrelated sales reports
- C
A module that validates order contents
- D
A module that stores application data and also decides promotional campaigns
True or false: A design is always better when it has more modules and abstraction layers, even if those additions provide no clear benefit.
- A
True
- B
False
What design principle calls for placing user interaction, business rules, and data storage in distinct parts of a system?
A team wants to change how data is stored without forcing unrelated callers to change. Which design choice best supports that goal?
- A
Keep storage details private behind an interface that exposes only the operations callers need
- B
Require every caller to know the database schema and construct storage queries directly
- C
Expose all internal data structures so callers can modify them freely
- D
Copy storage logic into each component that needs to save data
What software quality describes code that developers can understand and change without excessive effort or unintended effects?
A team wants a change to one module to be less likely to force unrelated changes elsewhere. Which design choice most directly supports that goal?
- A
Have each module read and modify another module’s internal state
- B
Make several modules depend directly on one concrete implementation
- C
Let unrelated modules share hidden global state
- D
Define a clear interface so one module can change internally without requiring unrelated modules to change