In the class diagram, we'll put attributes of our class in the section at the middle of the class' name and methods right?
I'm wondering, are we also put instantiated variables in there? Like the variables instantiating other classes and buttons?

Edited by Whilliam: n/a

8 Years
Discussion Span
Last Post by peter_budo

Depending on requirements given to you, but mostly no as the list of the variables would make it too long.
However I know a professor at university that demanded all variables to be listed too...


The class diagram should show only the externally visible characteristics of the class. Attributes (RW/RO/WO) correspond either to non-private variables, or to conventional non-private accessor methods. Private variables would not normally be shown, although you sometimes see one included because it's important to the reader's understanding of how the class works.


how to create a class diagram?

By using common sense. Class diagram represent all the method provided by the class and global variable used (not always required). Then you connect classes between each other depending on their availability. If this is not enough read here

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.