Académique Documents
Professionnel Documents
Culture Documents
Concepts
John: Person
name = John
Mary: Person
name = Mary
Sue: Person
GE: Company
name = GE
IBM: Company
name = IBM
name = Sue
Alice: Person
name = Alice
Object diagram
An association is a description of a
group of links with common structure
and common semantics.
The links of an association connect
objects from the same classes.
An association describes a set of
potential links in the same way that a
class describes a set of potential
objects
Person
name
Company
OwnsStock
*
* name
Class diagram
Multiplicity
Multiplicity specifies the number of
instances of one class that may relate to
a single instance of an associated class.
It is a subset of nonnegative integers.
UML diagrams explicitly list multiplicity
at the end of association lines.
UML specifies multiplicity with an
interval, such as 1 (exactly one),
1..* (one or more), or 3..5 (three to
five inclusive) or * (many/ zero or
more)
Country
HasCapital
1
name
India: Country
name = India
CapitalCity
1 name
HasCapital
Delhi:
CapitalCity
name = Delhi
Workstation
console
1
0..1
Zero - or one
multiplicity
Window
anAssociation
*
anA:
A
aLink
anA:
A
anAssociation
anotherAssociation
aLink
anotherLink
aB:B
aB:B
Person
employee
*
employer
WorksFor
0..
1
Company
Directory
User
authorizedUser *
container0..1
contains *
Ordering
Screen
{ordered}
1
VisibleOn
Window
Association Classes
An association class is an association
that is also a class
It can have attributes and operations
and participate in associations
File
AccessibleBy
accessPermission
/etc/temp
Ram
/etc/temp
Mohan
/usr/lgn
Shyam
read
read-write
read-write
User
boss
0..1
Person
name
dob
address
worker
Manages
0..1
Company
Name
address
WorksFor
Salary
Job-title
performanceRating
Qualified associations
A qualified association is an association in
which an attribute called the qualifier
disambiguates the objects for a many
association end.
It is possible to define qualifiers for oneto-many and many-to-many associations.
A qualifier selects among the target
objects, reducing the effective multiplicity
from many to one.
Bank
Account
accountNumber
Not Qualified
Bank
accountNum
ber
Qualified
0..1
Account
StockExchange
Lists
Company
tickerSymbol
Not Qualified
StockExchange tickerSymbol
Qualified
Lists
0..1
Company