The following realization proposal builds on pointers as relations. Consider the following descibed steps, shown also graphically in the image attached. In addition a sample implementation is available in the attached package.
Sample Realisation of solution 2b - Version 1: as attachment to this postSample Realisation of solution 2b - Version 2: as attachment to this posta) Abstract class is introduced to define all attributes necessary for the sub-class.
b) New additional pointer is introduced.
c) E has aPx, bPy and ePy, so it can be modelled as pointer and can be queried by pointer name. For visual represenation of the pointer, additional drawing of generic relation is necessary. As pointers are instance attributes, the search needs to consider the query of instance attributes.