Rajinder Yadav - Windows C++ Development Tools & Resources :Design, Code, Test, Deploy
UML Basics
Introduction
Object Oriented Software
Substitution Principle
Structural Diagrams
Behavioral Diagrams
Design by Contract
Interface Based Development
Diagram Elements
Note fixture
Constraint fixture
Stereotype fixture
Tagged Value fixture
Path fixture
Relationships
Dependency
Association
Aggregation
Composition
Multiplicity
Structural Diagrams
Class
Component
Deployment
Object
Package
Behavioral Diagrams
Activity
Collaboration
State Machine
Sequence
Use Case
Diagram Elements - The Unified Modeling Language (UML)

PreviousNext

UML Guide v2.1

Author: Rajinder Yadav
Date: Sept 21, 2007

Diagram Elements
Here will will discuss the general UML notations that can be used with in the various UML diagrams. We will started by talking about UML adornments, then move on to the different message types and then discuss relationships.

* Constraints are used to denote limits or scope of a UML model such as a class, or object. Constraints are placed inside curly braces, the diagram shows that a ChartViewPirce object is only allowed "read-only" access to the market price data from the MarketDataMgr, while a ChartViewVolume object can only read volume data.


Diagram 1 - UML Constraint

* Notes in UML allow comments to be fixed to UML model to provide details that would otherwise not be apparent.


Diagram 2 - UML Note

* Stereotypes are meta-information that allow a UML element to be extended, stereotypes are placed inside double angle brackets, "<<stereotype>>". A example of a stereotype might be "<<interface>>" or "<<singleton>>".

<<Singleton>>

class DBServiceMgr

-clients:vector<string>
-connections:int
+Connect()
+Open()
+Close()

Diagram 3 - UML Stereotypes

* Tagged Value is a (name,value) tuple that can be attached to a UML model element, it is used to describe a property that is not visible. A string may be used to show the tagged property, the notation used is a pair of "{ keyword=value }" braces with the property listed inside.


Diagram 3 - UML Tagged Value

* Paths are lines that join UML elements to form a structured network of a static model. Paths can show the flow of control from one element to the next, or they can show how each element is associated with other elements. The following table lists the type of path available.

Path ElementLabelDescription
Bi-directional
Association
Peer-to-peer relationship, communication occurs in both directions.
Uni-directional
Association
One way relationship, used to show master/slave relationship. One side may not be away of the other side in a direct relationship.
GeneralizationUsed to show the genealogy of element in a hierarchal structure such as with classes/subclass relationships. Shows an "is-a" relationship.
RealizationWhen a element such as a class or component supports an interface by providing implementation details (code).
DependencyShow as "uses" relationship, where one side is dependent on the other side to carry out an operation.
AggregationShows a weak-coupled "has-a" relationship, where one side is composed of zero or more other elements (such as a container).
CompositionShows a strong-coupled "has-a" relationship, where each side needs the other side in order to exist.

Table 1 - UML Paths

PreviousNext

Copyright © 2007 Rajinder Yadav, All rights reserved

UML logo are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries