Talk:Class diagram

General Relationship - Dependency
The Car-Wheel example seems a Containment rather than a Dependency. There is even a Car-Carburator example above. Why the relationship with the wheel is different from the one with the carburator ? (195.144.71.214 (talk) 05:42, 1 April 2009 (UTC))


 * I agree; intuitively we would say "a car has wheels", which is aggregation; rather than "a car uses wheels" which would be a dependency.
 * Also take the point about the carburetor. The diagram in the article describes this relationship as composition - but I would have thought the life-line of a carburetor is not implicitly tied to the life-line of the car (which would be the definition of composition), and so this too would be aggregation.
 * Ultimately: I agree. Would wait for more responses before changing anything. 62.25.109.195 (talk) 15:55, 2 April 2009 (UTC)


 * It definitely should be changed, maybe a relationship between a Car and DrivingInstruction could be used? could be a method public void drive(DrivingInstruction instruction). —Preceding unsigned comment added by 92.74.7.123 (talk) 07:49, 21 July 2010 (UTC)


 * Many cars have more than one carburetor. Given all the concerns above, maybe a more unambiguous example could be found? — Preceding unsigned comment added by 79.147.115.49 (talk) 17:47, 26 August 2019 (UTC)

Difference between aggregation and composition
I had a very good example of this during some training recently. If you consider a Human, and its Heart and Brain, it is clear that Human has a Heart and has a Brain. However, at present at least, a Heart can be removed from a Human without destroying either (and so the lifeline of Heart is not tied to the lifeline of Human) whereas a Brain cannot be removed without destroying the Human (and so the lifeline of Brain is dependant on the lifeline of Human).

If someone can word that better I think it would be a nice example to supplement or replace the current one. 62.25.109.195 (talk) 09:21, 7 April 2009 (UTC)

Can there be multiple associations between two classes
What if I have two classes and each knows the other one. For example a Plane know the current airport and the airport knows the plan. Should I then draw two connection arrows -- one from plane to airport and another vice versa. Would that be correct UML?

Confusion about Composition
I marked part of the "composition" section as inconsistent for two reasons: --Josephmarty (talk) 14:53, 24 September 2012 (UTC)
 * 1) "With composition (aggregation)" indicates that they are the same, even though it is clearly stated earlier that they are different (and they are) ... shall we just remove that parenthetical word?  Or am I missing some meaningful connotation?
 * 2) It says there should be an arrow on the side of the link pointing to the contained object, but the diagram doesn't show one.  Is there actually supposed to be an arrow or not?

Does aggregation still exist in the current UML specification (2.4.1)?
Maybe I'm wrong or simply I couldn't find it, but the spec doesn't distinguish anymore between aggregation and composition in favor of the second. — Preceding unsigned comment added by 95.18.118.145 (talk) 01:23, 21 March 2013 (UTC)

ambiguous multiplicity wordnig
> "notation at each end indicating the multiplicity of instances of that entity"

What entity?

That "that" has no antecedent in the sentence (and references in the preceding sentence and paragraph are to "object" and "class").

Did the author mean "notation at each end indicating the multiplicity of instances of the entity at that end"? — Preceding unsigned comment added by 2620:0:1000:1501:1260:4BFF:FE68:1974 (talk) 00:06, 8 August 2013 (UTC)

Table of contents
For me the table of contents appears on the right side of the "BankAccount" picture. I already tried to insert a newline, but that doesn't fix it. Can someone please move it under the picture? Fabian42 (talk) 10:24, 8 June 2017 (UTC)

"Dependency" appears twice
There are "Dependency" sections under both "Instance-level relationships" and "General relationship". Is that intentional, or could they be merged?

If the duplication is to be resolved by removing the "Dependency" section from "Instance-level relationships", does it help to have the "General relationship" heading when that section contains nothing but the "Dependency" section? It might be reasonable to merely remark, as part of the description of Dependency, that this is a general relationship, neither instance-level nor class level.

Thanks for any help.

DavidHolmes0 (talk) 20:38, 21 September 2017 (UTC)

Class example tweak


The BankAccount method withdrawal (see graphic) should probably be a verb, namely withdraw. I would have changed this myself but others may disagree so I added it here as a suggestion. With best wishes. RobbieIanMorrison (talk) 20:52, 15 October 2017 (UTC)

abstract class missing
The notion of an abstract (base) class, with its class name italicized, is missing from this article. With best wishes. RobbieIanMorrison (talk) 07:08, 4 April 2018 (UTC)

Relationship graphic shows wrong arrow for "association"
I currently have class diagrams in school and was told that the graphic is wrong.

An "association" is shown by nothing more than a line, but the graphic shows also an open arrow.

India Education Program course assignment
This article was the subject of an educational assignment supported by Wikipedia Ambassadors through the India Education Program.

The above message was substituted from by PrimeBOT (talk) on 20:00, 1 February 2023 (UTC)