Introduction of UML:
UML stands for Unified Modeling Language. This
object-oriented system of notation has evolved from the work of Grady Booch,JamesRumbaugh , Ivar Jacobson, and the Rational Software Corporation. These renowned computer scientists fused their respective
technologies into a single, standardized model. Today, UML is accepted by the Object Management Group
(OMG) as the standard for modeling
objected oriented programs.
Types of UML Diagrams: UML includes the following diagrams.
1. E-R diagram
2. Class diagram
3. DFD diagram
4. Use case diagram
5. Sequence diagram
6. Collaboration diagram
7. Activity diagram
8. State chart diagram
9. Deployment diagram
10. Component diagram
There are two broad categories of diagrams and then are
again divided into sub-categories:
1. Structural Diagrams
2. Behavioral Diagrams
Structural Diagrams: The structural
diagrams represent the static aspect of the system. These static aspects represent those parts of
a diagram, which forms the main structure, and therefore stable.
1. Class diagram
2. Object diagram
3. Component diagram
4. Deployment diagram
Behavioral Diagrams: Behavioral diagrams capture the dynamic aspect of a
system. Dynamic aspect can be further described as the changing/moving parts of
a system.
UML has the following five types of behavioral diagrams:
1. Use case diagram
2. Sequence diagram
3. Collaboration diagram
4. State chart diagram
5. Activity diagram
1. Entity Relationship Diagrams:
Entity
Relationship Diagram Notations:
1.
Entity: An entity is an object or concept about which you want to
store information.

2.
Weak
Entity: A weak entity is an entity that must
defined by a foreign key relationship with another entity as it cannot be
uniquely identified by its own attributes alone.

3.
Key
attribute: A key attribute is the unique,
distinguishing characteristic of the entity. For example, an employee's social
security number might be the employee's key attribute.
4.
Multivalve
attribute: A multivalve attribute can have more
than one value. For example, an employee entity can have multiple skill values.
5.
Derived
attribute: A derived attribute is based on
another attribute. For example, an employee's monthly salary is based on the
employee's annual salary.
6.
Relationships:
Relationships illustrate how two
entities share information in the database structure.
.
7.
Cardinality:
Cardinality specifies how many
instances of an entity relate to one instance of another entity. Ordinality is
also closely linked to cardinality. While cardinality specifies the occurences
of a relationship, ordinality describes the relationship as either mandatory or
optional. In other words, cardinality specifies the maximum number of
relationships and ordinality specifies the absolute minimum number of
relationships.
8.
Recursive
relationship: In some cases, entities can be self-linked.
For example, employees can supervise other employees.
2. Class Diagram:
Class
diagrams are the backbone of almost every object-oriented method including UML.
They describe the static structure of a system.
Basic Class Diagram Symbols and Notations: Classes represent an abstraction of entities with common
characteristics. Associations represent the relationships between classes.
1.
Active
Class: Active classes initiate and control
the flow of activity, while passive classes store data and serve other classes.
Illustrate active classes with a thicker border.
2.
Visibility:
Use visibility markers to signify
who can access the information contained within a class. Private visibility
hides information from anything outside the class partition.
3.
Associations: Associations
represent static relationships between classes. Place association names above,
on, or below the association line.
4.
Multiplicity
(Cardinality): Place multiplicity notations near
the ends of an association. These symbols indicate the number of instances of
one class linked to one instance of the other class.
5.
Constraint: Place
constraints inside curly braces {}.
Simple Constraint
6.
Composition
and Aggregation: Composition is a special type of
aggregation that denotes a strong ownership between Class A, the whole, and
Class B, its part.
7.
Generalization:
Generalization is another name for
inheritance or an "is a" relationship. It refers to a relationship
between two classes where one class is a specialized version of another
Purpose:
The purpose of
the class diagram
is to model
the static view
of an application.
The class diagrams are
the only diagrams
which can be
directly mapped with
object oriented languages
and thus widely used at the time of construction
3.Data Flow Diagram Notations: Data flow diagrams illustrate how data is processed by
a system in terms of inputs and outputs.
Process Notations
1.
Process: A process
transforms incoming data flow into outgoing data flow.
2.
Data store: Data stores are repositories of
data in the system. They are sometimes also referred to as files.
3. Dataflow Notations: Data flows are pipelines through which packets of information flow. Label the arrows with the name of the data that moves through it.
5.ExternalEntity Notations: External entities are objects outside the system,
with which the system communicates. External entities are sources and
destinations of the system's inputs and outputs.
4. Use Case Diagram: Use case diagrams model the functionality of a system using actors and use cases. Use cases are services or functions provided by the system to its users.
Use Case Diagram Symbols and Notations
1. System: Draw your system's boundaries using a rectangle that contains use cases. Place actors outside the system's boundaries.
2. Use Case: Draw use cases using ovals. Label with ovals with verbs that represent the system's functions.
3. Actors: Actors are the users of a system. When one system is the actor of another system, label the actor system with the actor stereotype.
4. Relationships: Illustrate relationships between
an actor and a use case with a simple line. For relationships among use cases,
use arrows labeled either "uses" or "extends." A
"uses" relationship indicates that one use case is needed by another
in order to perform a task. An "extends" relationship indicates
alternative options under a certain use case.
5. Sequence
Diagram:
Sequence
diagrams describe interactions among classes in terms of an exchange of
messages over time.
Basic Sequence Diagram Symbols and Notations:
1.
Class
roles: Class roles describe the way an
object will behave in context. Use the UML object symbol to illustrate class
roles.
2.
Activation:
Activation boxes represent the time
an object needs to complete a task.
3.
Messages: Messages are arrows that represent communication between
objects. Use half-arrowed lines to represent asynchronous messages.
Asynchronous messages are sent from an object that will not wait for a response
from the receiver before continuing its tasks.
Various message types for Sequence and Collaboration diagrams
Various message types for Sequence and Collaboration diagrams
4.
Lifelines:
Lifelines are vertical dashed lines
that indicate the object's presence over time.
5.
Destroying
Objects: Objects can be terminated early
using an arrow labeled "<< destroy >>" that points to an
X.
6.
Loops: A repetition or loop within a sequence diagram is depicted
as a rectangle. Place the condition for exiting the loop at the bottom left
corner in square brackets [ ].
6.Collaboration
Diagram: A collaboration diagram describes
interactions among objects in terms of sequenced messages. Collaboration
diagrams represent a combination of information taken from class, sequence, and
use case diagrams describing both the static structure and dynamic behavior of
a system.
Collaboration
Diagram Symbols and Notations
1.
Class
roles: Class
roles describe how objects behave. Use the UML object symbol to illustrate
class roles, but do not list object attributes.
2.
Association roles: Association roles describe how an association will behave
given a particular situation. You can draw association roles using simple lines
labeled with stereotypes.
3.
Messages: Unlike sequence diagrams, collaboration diagrams do not have
an explicit way to denote time and instead number messages in order of
execution. Sequence numbering can become nested using the Dewey decimal system.
For example, nested messages under the first message are labeled 1.1, 1.2, 1.3,
and so on. The a condition for a message is usually placed in square brackets
immediately following the sequence number. Use a * after the sequence number to
indicate a loop.
7. Activity
Diagram:
An activity diagram illustrates the dynamic nature of a
system by modeling the flow of control from activity to activity. An activity
represents an operation on some class in the system that results in a change in
the state of the system. Typically, activity diagrams are used to model
workflow or business processes and internal operation.
Basic Activity Diagram Symbols and Notations:
1.
Action
states: Action
states represent the noninterruptible actions of objects.
2.
Action
Flow: Action
flow arrows illustrate the relationships among action states.
3.
Object
Flow: Object
flow refers to the creation and modification of objects by activities. An
object flow arrow from an action to an object means that the action creates or
influences the object.
4.
Initial
State: A
filled circle followed by an arrow represents the initial action state.
5.
Final
State: An
arrow pointing to a filled circle nested inside another circle represents the
final action state.
6.
Branching: A diamond represents a decision with
alternate paths. The outgoing alternates should be labeled with a condition or
guard expression.
7.
Synchronization: A synchronization bar helps
illustrate parallel transitions. Synchronization is also called forking and joining.
8.
Swimlanes
: Swimlanes
group related activities into one column.
8. State chart Diagram:
A state
chart diagram shows the behavior of classes in response to external stimuli.
This diagram models the dynamic flow of control from state to state within a
system.
Basic State chart Diagram Symbols and Notations:
1.
States: States represent situations during the life of an object.
You can easily illustrate a state in Smart Draw by using a rectangle with
rounded corners.
2.
Transition: A
solid arrow represents the path between different states of an object. Label
the transition with the event that triggered it and the action that results
from it.
3.
Initial
State: A filled circle followed by an arrow
represents the object's initial state.
4.
Final
State: An arrow pointing to a filled circle
nested inside another circle represents the object's final state.
5.
Synchronization
and Splitting of Control: A short
heavy bar with two transitions entering it represents a synchronization of control.
A short heavy bar with two transitions leaving it represents a splitting of
control that creates multiple states.
9. Deployment Diagram: Deployment diagrams depict the physical resources in a
system including nodes, components, and connections.
Deployment Diagram Symbols and Notations:
1.
Component: A node is a physical resource that
executes code components.
2.
Association:
Association refers to a physical
connection between nodes, such as Ethernet.
3.
Components
and Nodes: Place components inside the node
that deploys them.
10. Component Diagram: A component diagram describes the organization of the
physical components in a system.
Component Diagram Symbols and
Notations:
1.
Component
: A
component is a physical building block of the system. It is represented as a
rectangle with tabs.
2.
Interface: An
interface describes a group of operations used or created by components.
3.
Dependencies:
Draw dependencies among components
using dashed arrows.
1 comment:
Good
Post a Comment