CS FundamentalsVery hardProduct-company design interview
Using Robert Martin's Stable Dependencies Principle, package A has instability I = 0.2 and package B has I = 0.8. Which dependency direction is preferred?
- A. A should depend on B
- B. Neither may depend on the other
- C. Direction does not matter
- D. B should depend on A
Correct answer: D. B should depend on A
Dependencies should point towards stability (lower I). B is unstable (I = 0.8) and easy to change, so it may depend on the stable A; a stable package depending on a volatile one would be dragged into frequent changes.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- What is the cyclomatic complexity of this function, counting each simple condition separately and each loop header as one decision? python…
- A team wants its HTTP API to allow safe retries of PUT /users/42 with the full user body. Which property of PUT makes this safe, and what…
- Putnam's software equation implies that, for a fixed size and process productivity, effort varies as 1/t^4, where t is the development…
- A project has BAC = ₹500 lakh, PV = ₹240 lakh, EV = ₹200 lakh and AC = ₹250 lakh. If both cost and schedule performance are expected to…
- Last sprint, 6 developers working 10 days completed 30 story points. Next sprint 5 developers are available for 9 days each. Using the…
- A single-server queue (M/M/1) serves 10 requests per second. At 8 requests/s the mean response time W = 1/(μ - λ) is 0.5 s. What happens…