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?
- A. 0.05
- B. 0.55
- C. 0.95
- 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.
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 happens when this builder code runs? python class QB: def init(self): self.parts = [] def where(self, c): self.parts.append(c)…
- What does this plugin-registry code print? python class Plugin: registry = [] def init(self, name): self.registry.append(name) class…
- What does this Template Method code print? python class Base: def run(self): return self.a() + self.b() def a(self): return 'A' def…
- Why do many agile teams estimate story points on a Fibonacci-like scale (1, 2, 3, 5, 8, 13, …) instead of 1 to 10?
- Match each risk response with an example. P. Avoid Q. Transfer R. Mitigate S. Accept 1. Buy fixed-price insurance against data-centre…
- In an ATAM architecture evaluation, encrypting all messages between services improves security but raises latency. In ATAM terms, what is…