Visual Paradigm Logo
     Build Quality Applications Faster, Better and Cheaper
 
Home | Products | Download | Documentation | Support | Resources | Partners | Quick Tour | Shop | Company |  
 
   Visual Paradigm Discussion Forum
  Login   [ Register ] Email: Password: Log me on automatically I lost my password  
Recent Topics
Advanced Search
How to show class contained as attribute in another class  
Forum Index -> UML Questions
Author Message
Anonymous

Hi,

I am a beginner with UML, so please forgive the basic nature of this question.

I wish to depict the following common situation on a UML 2 class diagram:

Code:
classA {}
 
 classB
 {
   private: classA myIdentifier;
 }
 

My question is: on the diagram, do I add an attribute to ClassB and give this the type ClassA or do I omit the attribute and put both classes on the diagram with an association between them? Or do I do both?

What is the preferred (correct?) way of showing this?

Any help or advice would be very much appreciated.

Best wishes, Patrick Skelton
 
Jick


Joined: 2005/04/29
Messages: 2879

Offline

Hi Patrick,

Please see if the image attached is what you are looking for.

Best regards,
Jick

Attached Image : No description given (3 kb)


Visual Paradigm International Ltd.
http://www.visual-paradigm.com

Build Quality Applications Faster, Better and Cheaper
 
 
   Forum Index -> UML Questions
Go to:   
Powered by JForum 2.1.4 © 2005 - Rafael Steil