An Interface Problem
This chapter focuses on how to make a general (computing/programming) facility generic enough to be useful for a large set of applications, but specific enough to make it practically useable. Concrete examples are: a library for integrating ordinary differential equations or a library to read XML files (see Section 7.4). To elaborate on the second example, you can read such files piece by piece and deal with the data you read directly or you can store the data in some convenient structure for later reference – the SAX and the DOM approaches.
Now examine various implementations for a somewhat simpler problem: integrating a function over a particular interval.1 You are not interested in the numerical aspects, though they ...