IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
Coder
Search Coder Group:

Advanced
-Collapse +Expand Coder Study Test
PRESTWOODCERTIFIED
-Collapse +Expand Coder Store
PRESTWOODSTORE

Prestwood eMagazine

December Edition
Subscribe now! It's Free!
Enter your email:

   ► KBRole-Based T...Coding & OOObject Orien...   Print This     
  From the February 2014 Issue of Prestwood eMag
 
Coder Object Orientation (OO):
Composition
 
Posted 10 years ago on 6/30/2008 and updated 11/5/2008
Take Away: A composite relationship means that a class cannot exist by itself. It must exist as a member of another class. A composite relationship is indicated by a solid line with a solid diamond head pointing to the part class. Alternatively, you can show this relationship graphically with the part class nested in the whole class.
Coder Definition Flashcard:
 A flashcard from our Coder Flashcards Library
 A definition from our Coder Definitions Page

KB101261



Composition - A composite relationship means that a class cannot exist by itself. It must exist as a member of another class. A composite relationship is indicated by a solid line with a solid diamond head pointing to the part class. Alternatively, you can show this relationship graphically with the part class nested in the whole class.

Composition is a type of class or object association.  A composite relationship means that a class cannot exist by itself. It must exist as a member of another class. A composite relationship is indicated by a solid line with a solid diamond head pointing to the part class. Alternatively, you can show this relationship graphically with the part class nested in the whole class.

UML Symbol

UML Composition Arrow

 

Summary of Relationships

A composite relationship represents a "uses-a" relationship. Contrast this with aggregation which represents a "has-a" or "is-part-of" relationship. You can also contrast this with inheritance which represents an "is-a" relationship and with interfaces which represents a "behaves-as" or "looks-like" relationship.

More Info

Article:  Introduction to the Unified Modeling Language
Article:  OO/UML: Aggregation versus Composition

Comments

0 Comments.
Share a thought or comment...
 
Write a Comment...
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1135A1
Enter key:
Definition Contributed By Mike Prestwood:

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Visit Profile

 KB Article #101261 Counter
9471
Since 6/30/2008
-
   Contact Us!
 
Have a question? Need our services? Contact us now.
--Mike Prestwood

Call: 916-726-5675

email: info@prestwood.com


Go ahead!   Use Us! Call: 916-726-5675 


©1995-2018 Prestwood IT Solutions.   [Security & Privacy]