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
Joined: Oct 24, 2010
Hello everybody. If I didn't make my question clear, please let me know.
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.