Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

check the class diagram

 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
can you tell me whether my class diagram is conforming to the UML version or not, and the concept is right or not
gif file is here
http://photos.groups.yahoo.com/group/scea_j2ee/vwp?.dir=/&.src=gr&.dnm=classdiadram1.gif&.view=t&.done=http%3a//photos.groups.yahoo.com/group/scea_j2ee/lst%3f%26.dir=/%26.src=gr%26.view=t

i.e under scea_j2ee group \ photo section classdiadram1
Thanks
kundan
 
Pierrefoids samuel
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1/you can't model the same relation as attribute and association in the same time
2/Not directed associations are, by default, bidirectional
3/Cardinality should be shown for the client classifier and the supplier classifier

Regards
Samuel
 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Samuel
Didnt get you.1 and 3rd points are not clear. Can you explain a bit more on that.

Thanks
kundan
 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
can you tell me address and credit card should contain ref to Customer or vice versa

Thanks
kundan
 
Pierrefoids samuel
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1/:If you model an association between two classes: Customer and Address , Address shouldn't be an attribute of Customer .
3/Cardinality (or multiplicity)should be shown at the two ends of an association.

"can you tell me address and credit card should contain ref to Customer or vice versa"

It's your design choice, depends on your control flow.(your sequence diagram will help you)

Hope this helps
Regards
Samuel
 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
THanks Samuel
Yes that helps i changed my class design accordingly. Can i get you mail id. I wanna send u one gif image to check whether i am in right direction or not.

Thanks
kundan
 
sys alley
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Samuel,
But I have seen in some class diagram after having association they have showed the attributes. such as if have association with customer and address
they showed attributes of customer in address and address in customer.

do u like to clarify this things more and if have any url for this reference
 
Pierrefoids samuel
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sys

I agree with you, but these diagrams aren't fully UML compliant. Objects have properties and behavior, in UML, properties are modeled as attributes or associations.Rules of thumbs, properties are modeled as:
-attributes if they are primitives,String, values objects(objects which haven't identity (in your context) : Date. BigDecimal....)
-associations if these properties are references objects : complex objects with interesting identity and behavior, Address is a complex object with important properties: street,city, zipcode, state, country, many enterprises use these properties for statistical market analysis.
You can find excellent books on UML:
"UML user guide": Grady Booch, James Rumbaugh, Ivar Jacobson
Publisher: Addison Wesley
"UML distilled": Martin Fowler Publisher:Addison Wesley
Regards
Samuel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic