CS FundamentalsVery hardProduct-company placement

A package has 10 classes, 2 of them abstract. 3 outside classes depend on it (Ca = 3) and it depends on 9 outside classes (Ce = 9). Using Martin's metrics, I = Ce / (Ca + Ce), A = abstract / total, and distance from the main sequence D = |A + I − 1|, what is D?

  1. A. 0.05
  2. B. 0.55
  3. C. 0.95
  4. D. 0.25

Correct answer: A. 0.05

I = 9/12 = 0.75 and A = 0.2, so D = |0.2 + 0.75 − 1| = 0.05: close to the main sequence. Swapping Ca and Ce gives I = 0.25 and D = 0.55.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic