The example is the following :
----------- --------------------
| X | 1..1 0..1 | <<abstract>> |
| |<>------------| Y |
|-----------| |--------------------|
| +a:bool | | +b:positiveInteger |
'-----------' '--------------------'
In the real world, abstract Y can be a concrete A, B or C, according to the following rules :
- when
a
istrue
, Y is an A class ; - when
a
isfalse
andb == 1
, Y is a B class ; - when
a
isfalse
andb > 1
, Y is a C class.
How would you modelize these rules of inheritance in an UML class diagram ?