Aggregation relationships in UML models - IBM

文章推薦指數: 80 %
投票人數:10人

In UML models, an aggregation relationship shows a classifier as a part of or subordinate to another classifier. An aggregation is a special type of association ... Aggregationrelationships In UMLmodels,anaggregationrelationshipshowsaclassifierasapartofor subordinatetoanotherclassifier.Anaggregationisaspecialtypeofassociationinwhichobjectsareassembled orconfiguredtogethertocreateamorecomplexobject.Anaggregationdescribes agroupofobjectsandhowyouinteractwiththem.Aggregationprotectsthe integrityofanassemblyofobjectsbydefiningasinglepointofcontrol, calledtheaggregate,intheobjectthatrepresentstheassembly.Aggregation alsousesthecontrolobjecttodecidehowtheassembledobjectsrespondto changesorinstructionsthatmightaffectthecollection. Dataflowsfromthewholeclassifier,oraggregate,tothepart.Apart classifiercanbelongtomorethanoneaggregateclassifieranditcanexist independentlyoftheaggregate.Forexample,aDepartmentclasscanhavean aggregationrelationshipwithaCompanyclass,whichindicatesthatthedepartment ispartofthecompany.Aggregationsarecloselyrelatedtocompositions. Youcannameanassociationtodescribethenatureoftherelationship betweentwoclassifiers;however,namesareunnecessaryifyouuseassociation endnames. Asthefollowingfigureillustrates,anaggregationassociationappears asasolidlinewithanunfilleddiamondattheassociationend,whichis connectedtotheclassifierthatrepresentstheaggregate.Aggregationrelationships donothavetobeunidirectional. Relatedtasks Specifyingrelationshipsindiagrams Feedback



請為這篇文章評分?