Nested Class Question

Dear all,

how do you represent a nested class in UML notation? dependency? Inheritance? :oops:

You can use containment relationships. Please see the attached screenshot for more detail.


nested_class.png

Hello everybody!

Im developing a pogramm in Python, using the class diagramm and the code generator.
I’d like to add several classes to the same file, so I used the containment relation.
(see attachment)

Now, the code generator puts all the classes to the same file. Fine!
But after a second look, I noticed, that the generalization was now wrong!

The code I supposed to have was:


#===============================================================================
class MainClass():

  pass

#===============================================================================
class Parentclass():

  pass

#===============================================================================
class ChildClass(Parentclass):

  pass

and I got…


#===============================================================================
class MainClass():

  pass

#===============================================================================
class Parentclass():

  pass

#===============================================================================
class ChildClass(MainClass.Parentclass):

  pass

I’d prefer to have all the classes on the same level an not in a hierarchic structure!
Can I fix this by using another connector instead of containment?

greetings,
Simon

Unbenannt.JPG

Hi Simon,

Thanks for your post. I’ve forwarded the issue to our engineers to investigate. If there is any feedback, I’ll come back to you immediately.

Best regards,
Lilian Wong

Hi Simon,

I would like to let you know that we fixed the problem on Python code generation on nested class. Please download the patch from the following link. If there is any inquiry, please feel free to contact us.

http://files2.visual-paradigm.com/200905/Patch/20090508a/VP_Suite_Windows_4_0_20090508a.exe

Best regards,
Lilian Wong