i try to find a answert about my question, but I can not find a good explanation. The code below shows, that ClassA
and ClassB
extends from ClassAbsract
. But if I try to set the value from input
to self._x
python creates a new _x
field at the UML diagram.
In the ClassA
and ClassB
I just wanna set _valueA
or _valueB
. But here is the same, the defined variable is listed two times at the UML.
What is the mistake in my demo? I use the InteliJ PyCharm IDE
class ClassAbstract:
_x = None
def setXvalue(self,input):
self._x = input + 1
class ClassA(ClassAbstract):
_valueA = None
def setXvalue(self,input):
self._valueA = input + 2
class ClassB(ClassAbstract):
_valueB = None
def setXvalue(self,input):
self._valueB = input + 3