First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Software Requirements and Specification
In a requirements specification, which characteristic distinguishes a functional requirement from a non-functional requirement?
- A functional requirement is owned by the customer, while a non-functional requirement is owned only by the development team.
- A functional requirement constrains qualities such as performance, while a non-functional requirement describes a behavior the system must provide.
- A functional requirement is always written in natural language, while a non-functional requirement is always written in a formal notation.
- A functional requirement describes a behavior or service the system must provide, while a non-functional requirement constrains qualities such as performance or usability. Correct answer.
Explanation
Functional requirements state what the system should do: services, reactions to inputs, and behaviors. Non-functional requirements describe constraints and quality attributes such as performance, reliability, security, and usability. The distinction is about behavior versus quality constraint, not notation or ownership.
Question 2Software Requirements and Specification
A team is choosing a requirements elicitation technique for a domain where users perform complex, poorly documented workflows. Which technique is most appropriate for observing actual work as it happens?
- Inspecting the source code of the legacy system
- Reviewing the project's risk register
- Ethnographic observation of users in their workplace Correct answer.
- Distributing a written questionnaire to all users
Explanation
Ethnographic observation captures tacit knowledge and real workflows that users may not articulate in interviews or questionnaires. It is especially valuable where processes are complex and undocumented. Questionnaires and code inspection do not reveal how people actually coordinate work.
Question 3Software Requirements and Specification
Which statement best describes the role of a use case in requirements specification?
- It records the internal class structure that implements a feature.
- It describes an interaction between an actor and the system that yields an observable result of value. Correct answer.
- It specifies the exact database schema needed to persist user data.
- It lists the non-functional performance targets for each subsystem.
Explanation
A use case models a goal-oriented interaction between an external actor and the system, ending in an observable result of value to that actor. It is a behavioral specification, not a design or data-storage artifact. It may reference quality constraints but does not define them.
Question 4Software Requirements and Specification
A requirements document states: "The system shall respond to any user query within 2 seconds under a load of 500 concurrent users." Which property makes this a well-formed requirement?
- It combines several unrelated quality attributes
- It leaves the load condition unspecified
- It is stated as a testable, quantified constraint Correct answer.
- It avoids naming a measurable threshold
Explanation
A good non-functional requirement is measurable so that it can be verified by testing or measurement. This statement gives a response-time threshold and a defined load condition, making it objectively checkable. Vague or unquantified quality statements cannot be verified.
Question 5Software Requirements and Specification
Which document is primarily intended to define the boundary between the system under development and its surrounding environment, including external interfaces?
- The configuration management plan
- The test log
- The detailed design document
- The system context description Correct answer.
Explanation
A system context description or context diagram establishes what is inside the system boundary and what external entities and interfaces surround it. This boundary definition guides scoping and interface requirements. Design, test logs, and configuration plans serve later phases.
Question 6Software Requirements and Specification
Which requirements prioritization approach ranks requirements by the ratio of perceived value to implementation cost, helping a team pick the highest-leverage items first?
- Cost-value prioritization Correct answer.
- Pairwise comparison of stakeholders
- MoSCoW
- Traceability matrix analysis
Explanation
Cost-value prioritization ranks requirements by expected value relative to the effort or cost of implementing them, favoring high-value, low-cost items. MoSCoW sorts by necessity categories rather than a ratio. Traceability links requirements to artifacts but does not rank by value.
Question 7Software Requirements and Specification
During validation, reviewers find that a requirement says the system "shall be user-friendly." What is the most appropriate corrective action?
- Delete it because usability cannot be specified
- Keep it and rely on user acceptance testing to interpret it
- Rewrite it as measurable criteria such as task completion time or error rate Correct answer.
- Move it to the design document as an implementation guideline
Explanation
Vague quality terms like "user-friendly" cannot be verified, so they should be replaced with measurable usability criteria such as task completion time, error rate, or satisfaction scores. This makes the requirement testable while preserving intent. Deleting it loses a real stakeholder concern.
Question 8Software Requirements and Specification
A requirements engineer writes a scenario that describes the normal flow plus several alternate and exception flows for placing an order. Which modeling artifact does this most closely correspond to?
- An entity-relationship diagram
- A fully dressed use case Correct answer.
- A state machine diagram
- A data flow diagram
Explanation
A fully dressed use case documents preconditions, main success scenario, alternate flows, and exception flows. The main scenario plus alternates and exceptions is the hallmark of this template. Data flow, ER, and state machine diagrams model other concerns.
Question 9Software Requirements and Specification
Which requirement traceability link connects a requirement backward to the stakeholder need or source that motivated it?
- Verification link to test cases
- Derivation link to design components
- Pre-requirement or source link Correct answer.
- Allocation link to architecture modules
Explanation
Backward traceability to the origin of a requirement is often called a pre-requirement or source link, connecting the requirement to the stakeholder need or document that justified it. Forward links connect requirements to design, tests, and code. This origin link supports impact analysis and justification.
Question 10Software Requirements and Specification
A stakeholder group insists on a feature that conflicts directly with a regulatory constraint. What is the most appropriate requirements engineering response?
- Escalate by removing the regulatory constraint from the scope
- Silently drop the feature from the specification
- Implement the feature and document the conflict after release
- Record the conflict, negotiate with stakeholders, and resolve it against the regulatory constraint Correct answer.
Explanation
Conflicting requirements must be surfaced, recorded, and resolved through negotiation, with mandatory constraints such as regulations taking precedence. Documenting the conflict enables informed trade-offs and an audit trail. Ignoring or silently dropping requirements undermines trust and traceability.
Question 11Software Requirements and Specification
Which technique best supports checking a specification for internal consistency across many interrelated requirements?
- Building a requirements model and checking it for contradictions Correct answer.
- Interviewing a single stakeholder about preferences
- Reading the document once from start to finish
- Estimating development effort for each requirement
Explanation
Modeling requirements, for example with data and behavior models, lets reviewers systematically detect contradictions, gaps, and overlaps that prose review may miss. A single linear read rarely exposes cross-requirement conflicts. Effort estimation and single-stakeholder interviews do not test consistency.
Question 12Software Requirements and Specification
In a requirements specification, what does the term "shall" conventionally signal, as opposed to "should" and "may"?
- A mandatory, binding requirement Correct answer.
- An optional capability left to the developer's discretion
- An assumption about the operating environment
- A recommendation that implementers can weigh against alternatives
Explanation
In standards-style requirement writing, "shall" denotes a mandatory requirement, "should" a recommendation, and "may" a permitted option. Consistent use of these keywords reduces ambiguity about obligation. Assumptions are typically recorded separately from normative statements.
Question 13Software Requirements and Specification
A team adopts a user story format. Which element ensures the story captures the value and the reason it matters?
- The "so that" benefit clause Correct answer.
- The story point estimate
- The definition of done
- The acceptance criteria list
Explanation
The common user story template is "As a role, I want a capability, so that benefit." The "so that" clause expresses the value or motivation behind the story. Acceptance criteria define completion conditions, while estimates and definitions of done are process artifacts.
Question 14Software Requirements and Specification
A specification uses the phrase "the system shall process transactions quickly." Which review criterion does this violate most directly?
- Correctness of the domain terminology
- Completeness of actor definitions
- Feasibility of the implementation schedule
- Verifiability of the requirement Correct answer.
Explanation
"Quickly" has no measurable threshold, so a tester cannot objectively confirm the requirement is met. This is a verifiability defect. Completeness, terminology, and schedule feasibility are separate review criteria not directly implicated by the vague adverb.
Question 15Software Requirements and Specification
Which modeling view is most useful for specifying the valid states of a single order and the events that trigger transitions between them?
- A context diagram
- A class diagram
- A state machine model Correct answer.
- A use case diagram
Explanation
A state machine models the lifecycle of a single entity, capturing its states, events, guards, and transitions. It is the natural choice for specifying allowed order states such as placed, paid, and shipped. Context, class, and use case diagrams address different concerns.
Question 16Software Requirements and Specification
A requirements engineer must decide whether to specify a feature as a requirement or leave it to design discretion. Which consideration most strongly favors specifying it as a requirement?
- The feature is technically interesting to the architects
- The feature is a stakeholder-visible obligation that affects acceptance Correct answer.
- The feature is inexpensive to build
- The feature can be implemented in several ways
Explanation
Requirements should capture externally observable obligations that stakeholders care about and that affect acceptance. Internal choices about how to implement a feature belong to design. Technical interest, cost, and multiple implementation options are not by themselves reasons to elevate something to a requirement.
Question 17Software Requirements and Specification
In requirements management, what is the primary purpose of a change control process?
- To convert all requirements into test cases automatically
- To assess, approve, and record changes to baselined requirements in a controlled way Correct answer.
- To assign story points to newly proposed requirements
- To prevent any modification to the baseline once approved
Explanation
Change control ensures proposed changes are evaluated for impact, approved by authorized parties, and recorded against the baseline. It manages change rather than forbidding it. Estimation and test generation are separate activities that may follow an approved change.
Question 18Software Requirements and Specification
A specification includes a requirement that was derived solely from an assumption about a third-party API's behavior. Which traceability practice best mitigates the risk if that assumption proves false?
- Linking the requirement to the assumption so impact can be analyzed when the assumption changes Correct answer.
- Converting the assumption into a design constraint in the architecture document only
- Increasing the priority of the requirement to ensure early delivery
- Removing the requirement to avoid dependency on external systems
Explanation
Recording a trace link between the requirement and the assumption it depends on enables impact analysis if the assumption is invalidated. This keeps the dependency visible and manageable. Removing the requirement or hiding the assumption reduces transparency and increases risk.
Question 19Software Requirements and Specification
A team writes acceptance criteria as "Given a registered user, when the user submits valid credentials, then access is granted and a session token is issued." Which quality does this format primarily improve?
- Stakeholder prioritization of the feature
- Testable, unambiguous specification of expected behavior Correct answer.
- Architectural allocation of the feature
- Non-functional performance measurement
Explanation
Given-When-Then acceptance criteria express preconditions, actions, and expected outcomes in a form that can be turned directly into tests. This reduces ambiguity about when a story is complete. They do not measure performance, set priority, or allocate architecture.
Question 20Software Requirements and Specification
Two requirements in a specification are individually clear but jointly unsatisfiable: one mandates encryption of all stored data, the other mandates that a legacy reporting tool read the data unencrypted. What is the most rigorous requirements engineering action?
- Accept both and let developers resolve the conflict during coding
- Delete the encryption requirement because the legacy tool is older
- Record the conflict explicitly and negotiate a resolution that satisfies the mandatory constraints Correct answer.
- Downgrade both requirements to recommendations
Explanation
Jointly unsatisfiable requirements must be recorded as an explicit conflict and resolved through negotiation, often by changing the legacy interface or adding a controlled decryption path. Surfacing the conflict preserves traceability and accountability. Deferring to coding or deleting a security mandate shifts risk downstream.
Question 21Software Design and Architecture
In a layered architecture, which rule keeps dependencies manageable?
- Each layer may call only the layer directly beneath it. Correct answer.
- Each layer may call any layer that is physically deployed on the same host.
- Each layer may call any other layer as long as interfaces are published.
- Each layer may call upward to the presentation layer for formatting.
Explanation
Strict layering restricts a layer to invoking the next layer down, so changes stay localized and cycles are avoided. Allowing arbitrary calls or upward calls reintroduces coupling and circular dependencies that layering is meant to prevent.
Question 22Software Design and Architecture
Which design pattern is most appropriate when an object must change its behavior based on its internal state, avoiding large conditional blocks?
- State Correct answer.
- Observer
- Facade
- Decorator
Explanation
The State pattern encapsulates each state as a separate object and delegates behavior to the current state, replacing sprawling conditionals. Observer handles notification, Decorator adds responsibilities, and Facade simplifies a subsystem, so none addresses state-dependent behavior.
Question 23Software Design and Architecture
What does the Single Responsibility Principle primarily constrain?
- The number of instances a class may create
- The number of reasons a module has to change Correct answer.
- The number of methods a class may expose
- The number of interfaces a package may import
Explanation
SRP states that a module should have one reason to change, meaning one actor or stakeholder whose requirements drive it. It is not a count of methods, instances, or imports.
Question 24Software Design and Architecture
In UML class diagrams, what does an open (hollow) diamond at the whole end of an association indicate?
- Aggregation, a weak whole-part relationship Correct answer.
- Composition, where the part cannot outlive the whole
- A generalization from the part to the whole
- A dependency where the whole creates the part
Explanation
A hollow diamond denotes aggregation, a weak whole-part association in which parts can exist independently of the whole. A filled diamond denotes composition, where lifecycle is bound to the whole.
Question 25Software Design and Architecture
Which characteristic distinguishes a microservices architecture from a monolithic one?
- Services communicate only through in-process method calls.
- Services share a single relational database schema.
- Services are independently deployable and own their data. Correct answer.
- Services must be written in the same programming language.
Explanation
Microservices are independently deployable units that each own their data store, enabling autonomous evolution and scaling. Shared schemas, a single language, and in-process calls describe monolith traits rather than microservice traits.
Question 26Software Design and Architecture
Which view in the 4+1 architectural view model addresses concurrency, performance, and throughput?
- Logical view
- Process view Correct answer.
- Physical view
- Development view
Explanation
The process view captures runtime behavior such as concurrency, synchronization, performance, and throughput. The logical view covers functionality, the development view covers code organization, and the physical view covers deployment topology.
Question 27Software Design and Architecture
What is the main purpose of the Dependency Inversion Principle?
- Making high-level modules depend on abstractions rather than concretions Correct answer.
- Forcing every class to have a single public constructor
- Ensuring subclasses never override inherited methods
- Eliminating all interfaces from a design
Explanation
DIP states that high-level policy should not depend on low-level detail; both should depend on abstractions. This decouples policy from implementation so details can change without disturbing core logic.
Question 28Software Design and Architecture
Which artifact in a software architecture document typically records a significant design decision along with its context and consequences?
- Test plan
- Class diagram
- Architecture Decision Record Correct answer.
- Build script
Explanation
An Architecture Decision Record captures one significant decision, the forces that drove it, and the resulting consequences, preserving rationale over time. Diagrams, test plans, and build scripts document structure, verification, or automation rather than decision rationale.
Question 29Software Design and Architecture
A system must support adding new export formats (CSV, XML, PDF) without modifying existing export code. Which pattern best supports this requirement?
- Template Method
- Strategy Correct answer.
- Singleton
- Adapter
Explanation
Strategy defines a family of interchangeable algorithms behind a common interface, so new export formats are added as new strategy classes without editing callers. Singleton controls instance count, Template Method fixes an algorithm skeleton in a base class, and Adapter converts existing interfaces.
Question 30Software Design and Architecture
A class hierarchy has a base type Bird with a fly() method, and Penguin extends Bird but throws on fly(). Which principle does this design most clearly violate?
- Liskov Substitution Principle Correct answer.
- Interface Segregation Principle
- Dependency Inversion Principle
- Open-Closed Principle
Explanation
LSP requires that subtypes be usable wherever the base type is expected without breaking behavior; a Penguin that throws on fly() breaks that contract. The fix is to separate flying capability from the base abstraction.
Question 31Software Design and Architecture
In a microservices system, an order service must notify inventory and billing without coupling to their availability. Which approach best fits?
- Publishing domain events to a message broker for consumers to handle Correct answer.
- Synchronous chained REST calls from order to inventory then billing
- A single distributed transaction spanning all three services
- A shared database that all three services write to directly
Explanation
Asynchronous event publication decouples the producer from consumers and tolerates consumer downtime through broker buffering. Chained synchronous calls propagate failures, shared databases couple schemas, and distributed transactions reduce availability and autonomy.
Question 32Software Design and Architecture
Which statement best describes the role of a quality attribute scenario in architecture evaluation?
- It replaces the need for performance testing after deployment.
- It defines the coding standard that developers must follow.
- It makes a quality requirement concrete via source, stimulus, environment, artifact, response, and measure. Correct answer.
- It lists every functional requirement the system must implement.
Explanation
Quality attribute scenarios operationalize vague qualities such as availability or modifiability into testable statements with stimulus, response, and measurable criteria. They complement rather than replace functional requirements or testing.
Question 33Software Design and Architecture
A team wants to enforce that the domain layer contains no references to the persistence framework. Which technique best verifies this architectural rule automatically?
- A manual code review checklist applied before each release
- A static analysis rule that fails the build on forbidden package imports Correct answer.
- A code coverage threshold of eighty percent
- A naming convention for database tables
Explanation
Fitness functions such as static dependency rules enforce architecture constraints continuously in the build pipeline. Manual reviews are inconsistent, coverage thresholds measure test execution, and table naming does not detect code dependencies.
Question 34Software Design and Architecture
Which pattern should be applied when a client needs a simplified, unified entry point to a complex subsystem of several classes?
- Bridge
- Facade Correct answer.
- Proxy
- Composite
Explanation
Facade provides a higher-level interface that hides subsystem complexity from clients. Bridge separates abstraction from implementation, Proxy controls access to a single object, and Composite treats part-whole hierarchies uniformly.
Question 35Software Design and Architecture
In a hexagonal (ports and adapters) architecture, what is the role of a port?
- A message queue used only for logging
- A deployment node hosting the application
- A concrete database driver implementation
- An interface defining how the application interacts with the outside Correct answer.
Explanation
Ports are technology-agnostic interfaces that define inbound and outbound interactions, while adapters implement them for specific technologies. This keeps the domain isolated from infrastructure details.
Question 36Software Design and Architecture
Which coupling form is generally the weakest and most desirable between modules?
- Data coupling, where modules exchange only simple parameters Correct answer.
- Content coupling, where one module modifies another's internals
- Control coupling, where one module passes flags that steer another's logic
- Common coupling, where modules share global mutable state
Explanation
Data coupling passes only necessary data through parameters, giving the least interdependency among the listed forms. Content, control, and common coupling all create tighter, more fragile dependencies.
Question 37Software Design and Architecture
A team adopts event sourcing for an account ledger. Which consequence should they expect?
- Updates overwrite previous rows, so history is discarded.
- The audit trail must be rebuilt from database logs.
- Read and write models are forced into one shared schema.
- Current state is derived by replaying stored events, so queries need projections. Correct answer.
Explanation
In event sourcing, the append-only event log is the source of truth and current state is computed by replaying events, which typically requires projections for efficient reads. Overwrites, log-derived audits, and forced single schemas contradict the pattern.
Question 38Software Design and Architecture
Which tactic most directly improves the availability quality attribute in an architecture?
- Increasing the depth of the inheritance hierarchy
- Adding more comments to critical modules
- Introducing active redundancy with health monitoring and failover Correct answer.
- Reducing the number of unit tests to speed builds
Explanation
Availability tactics include redundancy, health monitoring, and failover so service continues despite component faults. Code structure and documentation choices do not address runtime fault tolerance.
Question 39Software Design and Architecture
An architect is choosing between a layered monolith and microservices for a small team delivering an early-stage product. Which reasoning is most sound?
- A modular monolith reduces operational overhead while preserving options to extract services later. Correct answer.
- Layered monoliths cannot be modularized, so microservices are mandatory.
- Microservices are always preferable because they scale independently.
- Service count should match the number of developers on the team.
Explanation
For a small team, a modular monolith limits operational complexity and deployment overhead while keeping boundaries clean enough to extract services when justified. Independent scaling benefits rarely outweigh the coordination cost at an early stage.
Question 40Software Design and Architecture
Which UML relationship best models a class that holds a reference to another class only as a method parameter?
- Generalization
- Realization
- Dependency Correct answer.
- Association with navigability
Explanation
A dependency indicates that one element uses another transiently, such as through a parameter, local variable, or return type, without a lasting structural link. Association implies a structural relationship, generalization implies inheritance, and realization implies interface implementation.
Question 41Software Design and Architecture
Which scenario best illustrates the Open-Closed Principle in practice?
- Adding a new payment provider by implementing an existing PaymentGateway interface Correct answer.
- Making all classes sealed to prevent inheritance
- Moving shared constants into a global module
- Editing a switch statement to add a new payment provider case
Explanation
OCP favors extension over modification, so adding a provider through a new implementation of an existing abstraction leaves tested code untouched. Editing a conditional adds risk to existing behavior, and sealing classes or global constants do not address extensibility.
Question 42Software Design and Architecture
An architecture evaluation using ATAM primarily aims to do which of the following?
- Produce a complete implementation schedule for the project
- Generate unit tests for each module automatically
- Certify that the system meets all performance targets
- Identify risks, sensitivity points, and tradeoff points against business drivers Correct answer.
Explanation
ATAM is a scenario-based method that surfaces risks, sensitivity points, and tradeoff points relative to business goals. It does not schedule work, generate tests, or certify achieved performance.
Question 43Software Design and Architecture
A system requires strict consistency for financial transfers while also serving high-volume read traffic. Which combination is most defensible?
- Writes spread across nodes with no consensus protocol
- Reads served from a cache that is never invalidated
- Eventual consistency on the write path with no reconciliation
- Single-node writes with strong consistency and read replicas fed by a change stream Correct answer.
Explanation
Keeping writes on a strongly consistent primary and serving reads from replicas fed by a change stream preserves write correctness while offloading read load. Unreconciled eventual writes, stale caches, and consensus-free multi-node writes all risk incorrect balances.
Question 44Software Design and Architecture
In a CQRS design, which risk most needs mitigation when the write model projects asynchronously to the read model?
- The read model must share the write model's schema.
- The write side cannot enforce invariants.
- Commands and queries must use the same DTO.
- The read side may return stale data immediately after a write. Correct answer.
Explanation
Asynchronous projection creates a lag window where reads do not yet reflect the latest write, so designs need read-your-writes handling or user-facing staleness cues. CQRS does not prevent invariant enforcement, require shared schemas, or force shared DTOs.
Question 45Software Design and Architecture
Which tactic best addresses modifiability when a module's change frequency is much higher than its neighbors?
- Increase coupling so changes propagate automatically
- Encapsulate the volatile module behind a stable interface and isolate its internals Correct answer.
- Document the module thoroughly and leave dependencies unchanged
- Merge the volatile module into its least stable neighbor
Explanation
Isolating volatile parts behind stable interfaces confines the ripple of change, a standard modifiability tactic. Increasing coupling, merging unstable code, or relying on documentation amplifies the cost of future changes.
Question 46Software Design and Architecture
Which design pattern is intended to decouple an abstraction from its implementation so that both can vary independently, typically by splitting a class hierarchy into two parallel hierarchies?
- Decorator
- Facade
- Bridge Correct answer.
- Adapter
Explanation
The Bridge pattern separates an abstraction from its implementation behind an interface, letting each side evolve through its own hierarchy without recompiling the other. Adapter and Decorator keep a single hierarchy and change interfaces or behavior rather than splitting the abstraction from its implementation.
Question 47Software Design and Architecture
A module's public API exposes a mutable collection field directly, and callers modify it, causing inconsistent internal state. Which design change most directly restores encapsulation of that module?
- Mark the collection field as static so all instances share one consistent copy
- Return defensive copies or unmodifiable views and keep the collection private Correct answer.
- Move the collection into a separate utility class that callers also use
- Document the field as read-only so callers avoid mutating it
Explanation
Encapsulation requires that a module control access to its internal state, so exposing the collection by reference leaks representation details. Keeping the field private and returning copies or unmodifiable views prevents external mutation and preserves invariants.
Question 48Software Design and Architecture
A team applies the Strategy pattern to pricing but instantiates the concrete strategy with a hard-coded new expression inside the context class. Which design consequence follows most directly?
- The strategy interface becomes redundant because only one implementation is used
- Runtime polymorphism stops working because the strategy is created internally
- The context gains the ability to swap strategies without recompilation
- The context remains coupled to a concrete strategy, so new strategies still require editing it Correct answer.
Explanation
Strategy only delivers its modifiability benefit when the context depends on the abstraction and the concrete choice is injected or resolved externally. Hard-coding an instantiation inside the context reintroduces a compile-time dependency on a concrete class, so adding strategies still forces a change to the context.
Question 49Software Design and Architecture
An architect must let a legacy component emit domain events while keeping the domain model free of messaging-library types. Which design approach best satisfies both constraints?
- Publish events from the presentation layer after querying the database for changes
- Define a domain-owned event interface and implement an adapter that translates it to the messaging library Correct answer.
- Serialize domain entities and let the messaging library infer event types at runtime
- Reference the messaging library in the domain model and publish events directly from entities
Explanation
Ports and adapters keep the domain dependent only on abstractions it owns, so a domain-defined event interface with a translating adapter isolates the messaging library. Direct references or runtime inference leak infrastructure concerns into the domain and undermine that boundary.
Question 50Software Design and Architecture
In a layered architecture, a service layer class calls a repository interface, and the repository implementation imports service-layer types to build its return values. Which assessment of this dependency structure is most accurate?
- It strengthens the architecture because bidirectional dependencies improve traceability
- It is harmless provided the service-layer types are immutable value objects
- It is acceptable because both layers depend only on interfaces rather than concrete classes
- It introduces an upward dependency that inverts the layering, so the repository should return domain types instead Correct answer.
Explanation
Layering constrains dependencies to point in one direction, normally from higher layers toward lower ones. A lower-layer repository importing service-layer types creates an upward dependency and a potential cycle, which is resolved by having the repository return domain types that both layers can reference.