Wrong inheritince of the abstract attributes in inheriting classes


#1

I needed to describe the following case in Class Diagramm using UML notation: the parent class has attribute of the abstract type (for example Variant) and the child class shall have the same attribute but quite concrete type (for example UInt32).
I define UInt32 as inheritor of .Variant. I described two classes A and B. I added attribute VA with the Variant type to the class A. I specified that the class B is a inheritor of a class A. When I tried to change type of VA attribute to UInt32 in the class B it led to the fact that in the class A the attribute VA accepted the same type.i.e. UInt32.
This wrong behavior of the SW.
Such behavior is watched both in version 13.2 and in version 14.1. and earlier versions your SW.

Please pay attention to this problem.

By the way same behavior has ‘Initial value’ attribute when define an attribute of a class.


#2

Hi Alexander,

We’re sorry about the problem you experienced, but in VP, the attribute shown in subclass is indeed the same model element as the one defined in the super class, so modification to one will also reflect on the other.

In order to model the scenario you mentioned, you may need to add a separate attribute with the same name but a different type, and then hide the super class attribute by selecting Presentation Options > Attributes > Customized from the Class’s popup menu. Hope this could solve your problem.

Best Regards,

Antony.


#3

Hi Antony,

Of cause it’s solved but only temporary because I use generate code and report engine. After it to leave many hand job to clear generation result.

It will be better if next release this task will resolved.

Thank you for your attention.

Alexander .


#4

Hi Alexander,

Thank you for your suggestion, we will consider fixing the problem. Sorry for the inconvenience caused.

Best Regards,

Antony.