CS FundamentalsHardGATE CS · Infosys
A structure chart shows a date-formatting utility called by 14 modules (high fan-in) and a controller module that calls 23 different modules (very high fan-out). Which assessment is most reasonable?
- A. Both are bad; fan-in and fan-out should always be 1
- B. High fan-in for a reusable utility is good; very high fan-out suggests the controller knows too much and should delegate through intermediate modules
- C. High fan-in is bad because the utility is overused; high fan-out is good
- D. Neither metric says anything about design quality
Correct answer: B. High fan-in for a reusable utility is good; very high fan-out suggests the controller knows too much and should delegate through intermediate modules
Reuse shows up as high fan-in, which is desirable for cohesive utilities. A module that directly coordinates very many others is complex and tightly coupled; textbooks suggest keeping fan-out to a modest number, say under 7.
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
- A team keeps postponing cleanup of a hard-coded module: each new feature touching it now takes three days instead of one. In the…
- A UML state machine has the transition Idle → Processing labelled 'submit [cart not empty] / validateCart()'. What do the three parts mean?
- A team draws one UML diagram showing which artefacts (JARs, containers) run on which nodes (servers, devices) and how the nodes…
- Using Robert Martin's Stable Dependencies Principle, package A has instability I = 0.2 and package B has I = 0.8. Which dependency…
- 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…