According to Sun Certified Enterprise Architect for J2EE Technology Study Guide, Generalization is visually represented as a line with a open arrow on the end, Realization is visually represented as a dashed-line with a solid arrow on the end. But from some other materials, Generalization is represented as a line with an open triangle on the end and Realization is represented as a dashed-line with an open triangle on the end. Can somebody tell me representing Generalization/Realization (in the exam) shoud use ARROW or TRIANGLE in the end? is it solid or open? Thanks
The arrow is used for association, not generalization. So just an arrow is "Association" Open rhombus on one end and arrow on the other is "Aggregation" Filled Rhombus on one end and arrow on the other is "Composition" Solid line with an open triangle is generalization Dashed line with open triangle is realization. Plain dashed line is dependency. HTH.
Sanjay Raghavan<br />SCJP2, SCEA-J2EE<br />Moderator - <a href="http://groups.yahoo.com/group/scea_prep" target="_blank" rel="nofollow">SCEA PREP</a><br />Co-Author - <a href="http://www.whizlabs.com/scea/scea.html" target="_blank" rel="nofollow">SCEA@Whiz</a><br /><i>Where did you sip your Java Today?</i>
Here is how I understand it. Some symbols... <|-- open triangle head <--- arrow head <> open diamond <<>> closed diamond ---- solid line - - - dashed line
[c1]<|-------[c2] generalization (inheritence) [c1]<|- - - -[c2] realization (implementation) [c1]---------[c2] association [c1]- - - - -[c2] dependency [c1]<>-------[c2] aggregation [c1]<<>>-----[c2] composition Arrow heads are different from triangle heads. You use arrow heads <-- to denote navigability, whether something is uni-directional or bi-directional (or neither). You can use arrow heads with associations, dependencies, aggregations, and compositions. Example: [c1]<------>[c2] bi-directional navigatable association [c1]<><----[c2] uni-directional navigatable aggregation etc... In all the UML tools that I have used generalization/realization symbols have always been open triangles. I have the Cade/Roberts book, and I see where they say that realization is a solid triangle. I have not seen this anywhere else. Is this an error in this book, or is it just an alternate symbol that can be used?
Tell me, Mr. Anderson, what good is a phone call when you are unable to speak?
Originally posted by Jack Coleman: I have the Cade/Roberts book, and I see where they say that realization is a solid triangle. I have not seen this anywhere else.
Hi Jack, I have not seen them anywhere else either. But from M.Cade's text there is a difference: The solid triangle and dashed line is said to be used for _semantic_ realization, see page 41. The open triangle and dashed line is used for a _structural_ realization (implementation) of an interface. The open triangle and solid line is used for a (structural) generalization (inheritance). The arrow head and dashed line is used for: 1 semantic (non-structural) _dependency_ (via method parameter...), (i.e. not a semantic realization) - - between two UML-elemants in a class diagram - - or in a component diagram 2 object flow in - - Activity Diagrams - - Events 3 messages between Statechart Diagrams 4 return (optional) in Sequence Diagrams. About the "semantic (non-structural) _dependency_" I also found in M.Hintz, "UML@Work". Seite 50, that the following all are the same: - open triangle plus dashed line - open triangle plus dashed line plus <<realize>> stereotype - arrow head plus dashed line plus <<realize>> stereotype But: - an "open triangle plus dashed line" is a _structural_ notation, - an "arrow head plus dashed line" is said to be a semantic one. So how could these both be the same? Back to first problem: Because nobody told us that he accepts M.Cade's "solid triangle and dashed line", I would consider it to be an editor's bug too. Please, if anybody does not agree, reply your veto! (before I will ask the authors themselves). Thomas.
a uni-directional navigation association can be expressed as that instance of a class has references to instance of another class. what structure can express aggregation and composition in java program?
SCJP<br />SCWCD<br />SCEA
posted 16 years ago
Originally posted by Timber Lee: a uni-directional navigation association can be expressed as that instance of a class has references to instance of another class.
Hi Timber, could you please quote the text passus that is ment or concerned? Thanks. Thomas.
Originally posted by Timber Lee: What structure can express aggregation and composition in java program?
Hi Timber again, sorry, I was not fair. I posted something I just had read, slept well then, awoke and drove crazy obout these differences myself then. So I re-edit this reply and move the topic (and maybe your original intention too?) to a new topic, because it does not concern to the topic about Generalization/Realization. Thomas. [ February 13, 2003: Message edited by: Thomas Taeger ]