Understanding Class Associations, Aggregation, and Composition in UML
34 – Where do we represent the data type classes?
Since it is a type of data could be displayed in the compartment of the attributes of the rectangle class, but as a class is not primitive, with its own attributes and associations, could be interesting as a conceptual class show in its own rectangle.
Should you use attributes to relate the conceptual classes at MD?
No attributes should be used to relate the conceptual classes at MD. The most typical violation of this principle is to add a type of foreign key attribute, as is normally done in the design of relational databases to associate two types.
36 – What is a class association?
What is aggregation?
What is a composition?
An association class is a class where we can add features lapropia association.
Aggregation is a type of partnership that is used to model whole-part relationships between things. The whole compound is called
How is the aggregation in UML?
The aggregation in UML is represented by a hollow or filled diamond at the end of the compound of a whole-part association. The aggregation is a property of a partnership role.
What does the aggregation of composition: diamond filler? Illustrate
The aggregation of composition or composition means that the party is a member of only one purpose and that there is a dependency of existence and disposition of the part on the compound. The composition is denoted with a diamond filler. This implies that only the compound has the part and who are in a hierarchy of parts in a tree. If the multiplicity at the end compound is exactly one, the party could not exist separate from a compound. If the multiplicity at the end of the compound in 0 .. 1, then could be eliminated and the compound still exist without belonging to any other compound.
EJ: There is a composition relationship between the hand and finger.
What does shared aggregation: diamond hole?
Shared aggregation means that the multiplicity in the end compound could be more than one, and is represented by a hollow diamond. It implies that the party may be simultaneously in many instances the compound. For example one might consider a UML package adds to its elements but one element could be referenced in more than one package.
40 – When would you consider showing an aggregation? And what is the benefit of the representation of the aggregation?
Show aggregations if they provide the following benefits:
· Clarifies restrictions on the domain you want existence of the independent part of the whole. On aggregate composition, the party could not exist beyond the lifetime of the whole.
> · Help in identifying a pattern created using GRASP Creator
· Operations that apply to all often spread to the parties.
What is each end of a partnership and has properties?
Each end of association is a role that has several properties: name and number. A role name identifies one end of a partnership and ideally describes the role of objects in the association.
42 – What does the focus on partnerships and Roles Roles as concepts?
In an MD role could model the real world in various ways, as a separate or portray him as a role in a partnership. Roles in associations are attractive because they are a relatively accurate way of expressing the same instance of a person assumes multiple roles in various associations. Roles as concepts become more flexible and facilitate the inclusion of unique attributes, associations and additional semantics. Furthermore, the implementation roles as separate classes is easier because of the limitations of programming languages, object-oriented.
What is a derivative? And how are displayed in a chart MD?
A derivative element can be determined from others. The attributes and associations are most commonly associated elements. Avoid displaying the associated elements in a diagram, since it adds complexity without new information, just add an element to be derived when an important element in terminology and excluding comprehension is impaired.
What a qualifier can be used in an association?
In a partnership could be used to distinguish a qualifier in the set of objects at the other end of the association based on the value of the qualifier. The inclusion of a qualifier to an MD reported as distinguished instances of a class relative to another class. The raters usually do not add new compelling and useful information we can fall into the trap of thinking design. But used judiciously can improve knowledge about the domain.
45 – What is reflexive association?
A concept may be associated with it, this is called a reflexive association.
46 – How can I represent that the associated objects are ordered?
If the associated objects be sorted they can be represented in parallel with an aggregation of composition.
47 – What can I use packages to organize the MD? How do you partition an MD?
An MD can easily grow and become large enough even to divide it into convenient packages that include concepts which are closely related, this serves to enhance understanding and addressing analysis work for, in which different people perform the analysis domain into different subdomains. A package in UML is represented by a folder.
To partition an MD in packages, put together the elements:
· They are in the same area of interest.
· Are together in a class hierarchy.
> • Participate in the cases of use.
· Are strongly associated.