The aspect becomes interesting if a class inherits apart from attributes and operationsalso a statechart diagram from its superclass as depicted in figure 3 and figure 4.
With the subclass specifying new operations that do not appear in the statechart diagram there are at least three interpretations.
- The operations fits into a certain pattern resulting from the superclass.
- The new operation can be executed at any time.
- We have found an error, that cannot be solved automatically.
In the first two cases it can be possible to complete the erronous specification meaningfully. In the first we expect from the operation that it behaves in an analogous way to the inherited operations. The difficulty here is obviously to recognise the schemes automatically and to insert the new oeprations properly. Realistic is only an interactice completion, that inquires about the underlying schemes and treats them accordingly.
In the second case the situation is much simpler. The operation can be defined as a recursive operation at all states.
|