Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Has-a
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== UML class diagram === [[File:AggregationAndComposition.svg|right | thumb |UML [[class diagram]]<br/>Composition and aggregation]] In [[object-oriented programming]] this relationship can be represented with a Unified Modeling Language [[Class diagram]]. This has-a relationship is also known as composition. As you can see from the Class Diagram on the right a car "has-a" [[carburetor]], or a car is "composed of" a carburetor. When the diamond is coloured black it signifies [[Object composition|composition]], i.e. the object on the side closest to the diamond is made up of or contains the other object. While the white diamond signifies [[Object composition#Aggregation|aggregation]], which means that the object closest to the diamond can have or possess the other object.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)