If two modules A and B depend on each other, what does that indicate in ADP terms?

Get ready for your Object‑Oriented Programming Test. Use flashcards and multiple-choice questions. Each question includes hints and explanations. Prepare for your exam today!

Multiple Choice

If two modules A and B depend on each other, what does that indicate in ADP terms?

Explanation:
In ADP terms, dependencies are modeled as a directed graph and they should form an acyclic graph. If two modules depend on each other, you’ve created a cycle: you can go from A to B and back to A. That cycle violates the principle and signals tight coupling that makes maintenance, testing, and evolution harder. So the correct interpretation is that a cycle exists between A and B. To fix it, you’d break the cycle by introducing an abstraction or reassigning responsibilities so dependencies flow in one direction (for example, both modules depend on a common interface or new shared module). The idea that there’s no cycle, or that you must merge them, or that the problem only matters if both are concrete, aren’t accurate because the cycle is the core issue here.

In ADP terms, dependencies are modeled as a directed graph and they should form an acyclic graph. If two modules depend on each other, you’ve created a cycle: you can go from A to B and back to A. That cycle violates the principle and signals tight coupling that makes maintenance, testing, and evolution harder. So the correct interpretation is that a cycle exists between A and B. To fix it, you’d break the cycle by introducing an abstraction or reassigning responsibilities so dependencies flow in one direction (for example, both modules depend on a common interface or new shared module). The idea that there’s no cycle, or that you must merge them, or that the problem only matters if both are concrete, aren’t accurate because the cycle is the core issue here.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy