5.2. A sample cookbook recipe

Reconsider the RoundingPolicy variation point realized through the Separation construction principle (Figure 5.2). It provides an abstract class RoundingPolicy together with three specific implementations of the hook method round() in subclasses. Let us assume this example is part of a framework and let us define a recipe for its adaptation. What is required for adapting the rounding variation point?

Figure 5.2. Keeping the rounding policy flexible by means of the Separation construction principle

If the framework provides all the required implementations of RoundingPolicy, an adaptation by composition is feasible. ...

Get UML Profile for Framework Architectures, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.