25-Comp-B11 Advanced Software Design · December 2014
Question 8 of 26: Software Reuse — Benefits and Challenges
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Notes on this paper
98-Comp-B11 Advanced Software Design — National Exams, December 2014. 3 hours, closed book, no calculator permitted. The paper is organized into five parts, and candidates were instructed to answer any three (3) questions in Part I, any four (4) in Part II, any four (4) in Part III, any two (2) in Part IV, and any two (2) in Part V — only the first questions answered, in each part, as they appear in the answer book are marked. All questions carry equal weight, so the 15 questions actually marked (3+4+4+2+2 of 26) each count for 100/15 ≈ 6.7% of the paper. All 26 questions are answered below for completeness.
Reference texts: Sommerville, Software Engineering (10th ed., Pearson) — software processes, requirements engineering, agile methods, design principles; Pressman, Software Engineering: A Practitioner's Approach (9th ed.) — supplementary process and quality coverage; Gamma, Helm, Johnson & Vlissides (GoF), Design Patterns: Elements of Reusable Object-Oriented Software — structural/behavioural pattern catalogue (Proxy, Bridge, Strategy, Observer, Template Method, Composite, etc.); Sebesta, Concepts of Programming Languages (12th ed.) — polymorphism, dynamic binding, inheritance and language-level object semantics (also underpins the Java/C++ discussion in Part V); Brown, Malveau, McCormick & Mowbray, AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis — anti-pattern catalogue (Question 18). Bertrand Meyer's Object-Oriented Software Construction is cited by name where the paper's own vocabulary (design by contract, open–closed principle) originates there; Barbara Liskov's 1987 substitutability paper is likewise cited by name for Question 11.
PART I — General Principles (answer any 3 of 5)
Question 8: Software Reuse — Benefits and Challenges (Part II)
Definition. Software reuse is building new software by incorporating existing software artifacts — components, libraries, frameworks, design patterns, generators, or even whole systems — rather than developing every part from scratch.
Benefits.
Reduced cost and time, since the reused artifact does not need to be (re)built.
Improved reliability, because a component that has already been exercised in prior use has an established track record and its defects have already been found and fixed by earlier users.
Reduced process risk, since the effort to integrate a known component is easier to estimate accurately than the effort to build new, unproven code.
Effective use of specialist effort, since reuse concentrates the cost of building a genuinely good component into a single effort, amortized across every project that reuses it.
Standards compliance, since a widely-reused component may already meet accessibility, security, or regulatory standards the new project would otherwise have to satisfy from scratch.
Challenges of BUILDING a reusable component (the producer's view — costs paid up front, before any reuse has happened):
Anticipating variability without over-engineering. A component must be general enough to serve future, not-yet-known callers, but every parameter/extension point added "just in case" that is never actually exercised is wasted design and testing effort (speculative generality).
Designing and freezing a stable public interface is harder than writing a one-off implementation, since the interface must remain compatible across every future caller once published — an internal-only routine can be changed at will, but a reusable component's interface effectively becomes a long-lived contract (Question 10) the moment the first client depends on it.
Documentation and test burden. A reusable component needs comprehensive documentation and a much broader test suite (covering configurations the original author may never personally use) than an equivalent one-off piece of code, raising its build cost well above a single-use equivalent.
Challenges of USING a reusable component (the consumer's view — costs paid at integration time and for the life of the dependency):
Loss of control over evolution, since a reused component's future direction (or discontinuation) is controlled by its own maintainer/vendor, not the reusing project.
Cross-boundary tool support gaps, since debugging and static analysis tools often stop being effective at the boundary of a third-party component whose internals are opaque.
"Not invented here" resistance, a cultural cost where engineers distrust or under-value externally-built code regardless of its actual quality.
Imperfect fit, where a reused component almost, but not quite, matches the new requirement, forcing a costly choice between adapting the requirement to the component or adapting (forking) the component.