Information Technology Reference
In-Depth Information
Fig. 3.8
Dependency
dictates that the target use case adopts the behavior of the source. Both relation-
ships involve selecting common behavior from several use cases for use in a single
use case, which is then used or extended by other use cases. The extends rela-
tionship is used when the intent is to adopt a certain set of behaviors and then build
on those behaviors to create an entity with increased capability. The uses rela-
tionship, on the other hand, allows for the straight forward adoption of some
common behavior, providing for reuse so that the behavior need not be copied
again and again.
3.3.5 Multiplicity
Relationships within the object-oriented paradigm come in a few different flavors,
defined by the number of possible associations that a class can have. This is known
as multiplicity, which defines the number of instances of an individual class that
may be associated with a single instance of another class. For a real world
example, imagine the fingers on a human hand. One hand may contain up to five
fingers. The hand has what is called a one-to-many relationship with its fingers.
Each finger, however, may be associated with only one hand, known as a one-to-
one relationship. Multiplicity in a UML diagram is denoted either by a single digit,
signifying the exact number of relationships that an entity will have, or using the
form ''x..y''. In the second instance, ''x'' and ''y'' are numbers, or symbols rep-
resenting numbers, and the entity will have a number of relationships that falls
somewhere within the range ''x'' to ''y''. Table 3.1 lists the most common types of
multiplicities, and the Fig. 3.9 illustrates a UML diagram indicating multiplicity.
Table 3.1 Types and
definitions of various
multiplicities
Multiplicity
Meaning
0..1
0 or 1 instance
0..*
0 to infinite instance (There is no limit of the
number of instances)
Exactly 1 instance
1
At least 1 instance (There must be a minimum
of 1 instance)
1..*
 
Search WWH ::




Custom Search