Modelling Early Design Revisited
Variables, introduced in §7.11, can be used not only for modelling design motifs but also for representing “undetermined” or unknown parts of the program. This chapter demonstrates how variables can be used during the early stages of design for the purpose of modelling programs that are yet to be developed.
Experienced software designers are well aware of the fact that premature commitment to implementation detail is detrimental to the remaining phases in the program's life cycle [Stroustrup 2000, Ch. 23]. The principle of abstraction in early design (p. 32) therefore dictates that constraints on the implementation should be introduced as late as possible. A design description language used for representing program blueprints must therefore offer us a means to articulate requirements without making premature commitments to implementation detail. For example, it should allow the designer to indicate the existence of classes or methods that satisfy specific requirements but whose remaining details are yet to be determined.
For example, rather than making a commitment to a particular class, a software designer may wish to specify that there exists some class that defines a method which overrides the abstract method Stack.push and which returns instances of (subclasses of) Stack. S/he does not wish to make any further commitments: for example, which class should implement this method, how many levels of inheritance separate it from class ...