Explain the background and the rationale for the
following modeling advice : When you are in doubt whether you
should model a relationship as an association or an aggregation,
model it as an association --
- The association -- association represent
binary relationship between two objects that describe an
activity.
- for example - A doctor can be associated with
multiple patients.
- To represent relationship between componants or classes, it
uses line segment.
- By Modeling it as an Association, structural
relationship that represent object which can be associated with
another objects in the sytsem.
- The constraints of association relationship are
--
- Implicit - the implicit relationship is based
on concept not on manifest.
- Ordered - This constriants specify that set of
object at one end of assoiation is in specific way.
- Changeable - This connection between various
object in system can be added, modified and removed.as
requirements.
- Frozen - When link is inserted between two
objects , at that time it can not be modified while frozen
constraint is active on given link.
- addOnly - It specify new connection can be
added from object which is situated at other end association.
Aggregation - This is used to model
compositional relationship between model elements. for
example - a library contains books and computer composed of number
of devices.
- The aggregation is based on main classes that are
dependent on sub classes. in this, sub class can exists without
main class but main class can not exists without
subclass.
- The aggregation relationship is represented by
"has" relationship. for example - List of
phone numbers.
- To represent relationship between objects, it use
diamond shape structure.