{"id":318,"date":"2009-01-29T14:37:34","date_gmt":"2009-01-29T19:37:34","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=318"},"modified":"2009-01-29T14:38:25","modified_gmt":"2009-01-29T19:38:25","slug":"uml-association-aggregation-and-composition","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=318","title":{"rendered":"UML Association, Aggregation, and Composition"},"content":{"rendered":"<p>There are three kinds of associations between two classes in UML notation.<\/p>\n<p><strong>Association:<\/strong><br \/>\nOne to one relationship.<br \/>\nExamples<br \/>\n-Object A is associated with one object B.<br \/>\n-One key is associated with one lock.<\/p>\n<p><strong>Aggregation:<\/strong><br \/>\nOne to many relationship.<br \/>\nExamples<br \/>\n-Object A is associated with many object Bs, but object A can also be associated with many object Cs at the same time.<br \/>\n-One student has many teachers.<\/p>\n<p><strong>Composition:<\/strong><br \/>\nIt is a special kind of aggregation (One to many relationship) but implies one object is made up of many of another objects.<br \/>\nExamples<br \/>\n-Object A is composed of many object Bs, when object A is destroyed, all object Bs are destroyed along with it.<br \/>\n-One house is composed of many rooms<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are three kinds of associations between two classes in UML notation. Association: One to one relationship. Examples -Object A is associated with one object B. -One key is associated with one lock. Aggregation: One to many relationship. Examples -Object &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=318\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[44],"tags":[],"class_list":["post-318","post","type-post","status-publish","format-standard","hentry","category-uml"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-58","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/318","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=318"}],"version-history":[{"count":2,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/318\/revisions"}],"predecessor-version":[{"id":320,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/318\/revisions\/320"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=318"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=318"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}