CS FundamentalsVery hardProduct-company design interview
A package has 6 classes outside it depending on it (afferent coupling Ca = 6) and depends on 2 outside classes (efferent coupling Ce = 2). Half its classes are abstract. Using Robert Martin's metrics I = Ce/(Ca + Ce) and distance D = |A + I - 1|, what are its instability and distance from the main sequence?
- A. I = 0.75, D = 0.25
- B. I = 0.25, D = 0.75
- C. I = 0.25, D = 0.25
- D. I = 0.75, D = 0.75
Correct answer: C. I = 0.25, D = 0.25
I = 2/(6 + 2) = 0.25 (a stable package) and D = |0.5 + 0.25 - 1| = 0.25. Swapping Ca and Ce gives I = 0.75; forgetting the '- 1' gives 0.75 for D.
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
- In COCOMO's maintenance model, annual maintenance effort = annual change traffic (ACT) x development effort. A system took 120…
- Activities (days; predecessors): A 3 (-), B 4 (A), C 2 (A), D 5 (B), E 3 (C), F 2 (D, E). What are the total float and the free float of…
- A product backlog has 210 story points left. The team's velocity has ranged between 25 and 35 points per sprint. What is the honest range…
- A 6-member team plans a 10-working-day sprint at 6 focus hours per person per day. One member is on leave for 3 days and another for 2…
- In a quarter a team made 40 production deployments. 6 of them caused incidents needing a fix or rollback, and restoring service took 9…
- A team wants estimates from several experts without anchoring on the loudest voice. A coordinator collects anonymous estimates, shares the…