Abstraction - Evaluations
This is a governing interface which ensures that any class
which implements it can produce the expressions of work which are required. In
this case, the Evaluation MustInherit class ensures that all classes
implementing it can hold a reference to a concrete implementer and call its
method to produce the concrete results.
RefinedAbstraction – VerbalEvaluation,
These contain a function which generates a signal indicating
the work to be done by the concrete implementation and also calls the
implementation function on the implementer object which it holds a reference
to, passing to it the signal which it has generated. In this case, it is a UI
control which captures an evaluation from the user and generates a rating value
to pass to the rating-renderer.
Implementation - RatingRenderer
An interacting interface which ensures that classes
implementing it can render the signal passed to it in a manner which completes
the work to be done (by displaying a graphical representation of the rating).
ConcreteImplementation – FaceRenderer,
This renders the signal into a tangible form which
represents completed work. In this sample code it renders the 1-to-5 rating in
a visual form which represents increasing levels of rating.