This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Nested Classes in UML

 
Gustavo Adolpho Bonesso
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to represent a Nested Class in UML ?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The last time I needed to draw an inner class into a class diagram (which was a long time ago), I ended up using the same class notation for both inner and regular classes. If the inner class is non-static, you can associate it to the outer class using a composition. Otherwise, I would just rely on the name ("MyOuter.MyInner") to communicate my intention.
However, I would be interested to know what others think about this as I really didn't do much research on existing practices at the time.
 
Gustavo Adolpho Bonesso
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, Lasse, i like the composition aproach to do the job...
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does UML 2.0 talk about nested classes?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic