Chapter: Object Oriented Analysis and Design

Association

Association defines the relationship between two or more classes in the System. These generally relates to the one object having instance or reference of another object inside it. This article discusses on how we can implement Association in UML.

Association:

 

       Association defines the relationship between two or more classes in the System. These generally relates to the one object having instance or reference of another object inside it. This article discusses on how we can implement Association in UML.

 

       Associations in UML can be implemented using following ways:

1.       Multiplicity

2.       Aggregation

 

3.       Composition

 

Multiplicity in UML: Multiplicity indicates the no of instance of one class is linked to one instance of another class. The various multiplicity values are listed below:

 

Notation     Description

         

1        Only One Instance

         

0..1    Zero or One Instance

         

*        Many Instance

         

0..*    Zero or Many Instance

         

1..*    One or Many Instance

         

 

Attributes

 

       It is a logical data value of an object

 

       In UML:

 

1.       Attributes are shown in the second compartment of the class box.

 

2.       The type of an attribute may optionally be shown.


       In a domain model, attributes and data types should be simple. Complex concepts should be represented by an association to another conceptual class.


 

       An attribute should be what the UML standard calls a data type: a set of values for which unique identity is not meaningful. Numbers, strings, Booleans, dates, times, phone numbers, and addresses are examples of data types. Values of these types are called value objects.

 

Relating Types

 

       Conceptual classes in a domain model should be related by associations, not attributes.

 

       In particular, an attribute should not be used as a kind of foreign key.



Quantities and Units

 

       Quantities with associated units should be represented either as conceptual classes or as attributes of specialized types that imply units (e.g., Money or Weight).


Derived Attributes

 

       A quantity that can be calculated from other values, such as role multiplicities, is a derived attribute, designated in UML by a leading slash symbol.

 

Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
Object Oriented Analysis and Design : Association |


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2024 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.