aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes check the class diagram Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "check the class diagram" Watch "check the class diagram" New topic
Author

check the class diagram

kundan varma
Ranch Hand

Joined: Mar 08, 2004
Posts: 322
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


SCJP1.4,SCBCD,SCEA,CNA
Failures are practice shoots for success.
Pierrefoids samuel
Greenhorn

Joined: May 22, 2005
Posts: 10
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

Joined: Mar 08, 2004
Posts: 322
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

Joined: Mar 08, 2004
Posts: 322
Hi
can you tell me address and credit card should contain ref to Customer or vice versa

Thanks
kundan
Pierrefoids samuel
Greenhorn

Joined: May 22, 2005
Posts: 10
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

Joined: Mar 08, 2004
Posts: 322
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

Joined: Jun 23, 2003
Posts: 16
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

Joined: May 22, 2005
Posts: 10
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: check the class diagram