I have been trying to learn the basics of UML for the past couple days or so by assembling a class diagram for a hypothetical Contact Manager--although it may not stay hypothetical if I can learn this properly ;). Unfortunately I am experiencing a bit of confusion in regards to properly communicating class hierarchy between associated / aggregated classes.

Here is the (very simple) diagram that I made thus-far:

http://www.aerosdesign.com/jsorensen/store/uml/uml_diag_a.jpg

Basically, I have three classes -- the Account class being a composition of the Contact and Address classes. (I think)

Here is my question:

When I say that class X is a "composition" of class Y and class Z, is this because X has properties that are defined AS _TYPE_ Y and Z?

My logic to place the Contact class and the Address class as composing elements of the Account class is simply because the Contact class have defined properties OF TYPE Contact and Address. Is this correct?

If this is the case, I will be glad to hear that I am doing things correctly. However, a new source of confusion then emerges for me; say, for instance that I wanted to have an Array of contacts for any given account as opposed to just one. I then replace accContact:Contact with accContacts:Array.

Here is the updated diagram:
http://www.aerosdesign.com/jsorensen/store/uml/uml_diag_b.jpg

The relationship between the Contact class and the Account class is no longer explicit--but I still want to convey that the accContacts array will be populated with instances of "Contact". How do I now communicate this relationship? Would this be an "association" now?

See this diagram if you are confused:

http://www.aerosdesign.com/jsorensen/store/uml/uml_diag_comment.jpg

A sincere thank you to anyone who took the time to read and attempt to understand my post; I apologize if this is slightly outside the scope of normal list discussion. If this is not an appropriate place to ask this sort of question, I would be very happy to hear about an active UML mailing list or equivalent alternative. :)

Thanks for any assistance,
Joseph
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to