Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sprecifics cases to be represent in Class Diagram.

 
Demetrio Carvalho
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I represent with a class diagram these situations:
1 - The Class cA that it is Inner Class inside Class cB. How do I desing the relationship between Classes cA and cB?
2 - The Class cC that receive a type of object cD as parameter. How do I desing the relationship between Classes cC and cD?
3 - The Class cE has a method mZ. The method mZ has a variable vX which is declare this way:
Object myObject = otherClass.newInstance();
myAbstractClass vX = (myAbstractClass) myObject;
In the last situation, I am wondering if I should show both class in the diagram:
the SuperClass (Object class) and the Abstract Class (myAbstractClass).
And, if I must show both, how do I represent the relationship between
the three classes: Object, OtherClass and MyAbstract.

Thanks in advance
Dem├ętrio
 
Demetrio Carvalho
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody. If I didn't make my question clear, please let me know.

Hugs
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have any ideas or answers to your own questions? If you post them, readers may be able to point out aspects that need work or stuff that is fine. As a hint, there are three main types of relationships in the UML. They are association, aggregation and composition and there are symbols for each one of these.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic