0% found this document useful (0 votes)
267 views24 pages

UML Lab Week-1

The document introduces UML (Unified Modeling Language) to students. It discusses UML's architectural views including class, object, use case, sequence, collaboration, state, and activity diagrams. It describes UML's building blocks such as classes, interfaces, associations, generalizations, and dependencies. The document provides examples and definitions of these concepts to help students understand UML's purpose for visualizing, specifying, constructing, and documenting software systems.

Uploaded by

Sumanth_Yedoti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
267 views24 pages

UML Lab Week-1

The document introduces UML (Unified Modeling Language) to students. It discusses UML's architectural views including class, object, use case, sequence, collaboration, state, and activity diagrams. It describes UML's building blocks such as classes, interfaces, associations, generalizations, and dependencies. The document provides examples and definitions of these concepts to help students understand UML's purpose for visualizing, specifying, constructing, and documenting software systems.

Uploaded by

Sumanth_Yedoti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 24

Week I

Introducing UML to the user


(Student).

Aim:To introduce the UML to an user (student) for


modeling.

The introduction to UML describes:

1. UML (Unified Modelling Language).


2. Architectural views of UML and
3. Building Blocks of UML.

1.UML (Unified Modeling Language)


UML is a language used for visualizing, specifying,
constructing

and

documenting

the

artifacts

of

software intensive system.

UML makes a clear conceptual distinction between


models, views and diagrams.
A Model is an element that contains information for a
software model.
A View is a visual expression of the information contained
in a model, and
A Diagram is a collection of view elements that represent
the users specific design thoughts.

Description about UML :Model:


1. A model is a simplification of reality.
2. A model provides the blueprints of a system.
3. A model may be structural, emphasizing the organization
of the system, or it may be behavioral, emphasizing the
dynamics of the system.
4. We build models so that we can better understand the
system we are developing.
5. We build models of complex systems because we
cannot comprehend such a system in its entirety.
Through modeling, we achieve four aims:
1. Models help us to visualize a system as it is or as we
want it to be.
2. Models permit us to specify the structure or behavior of a
system.
3. Models give us a template that guides us in
constructing as system.
4. Models document the decisions we have made
Principles of Modeling:
1. The choice of what models to create has a profound
influence on how a problem is attacked and how a solution
is shaped
2. Every model may be expressed at different levels of precision
3. The best models are connected to reality
4. No single model is sufficient. Every nontrivial system
is best approached through a small set of nearly
independent models.

Unified Modeling Language (UML) :


The UML is a language for
1.
2.
3.
4.

Visualizing
Specifying
Constructing
Documenting

The UML is a Language :


A modeling language is a language whose vocabulary and rules
focus on the conceptual and physical representation of a
system
The UML is a Language for Visualizing :
Some programmers think of an implementation and then
code it. Some programmers think mentally i.e. they even
sketch out a few ideas on a paper. That means some things
are best modeled textually, others are best modeled
graphically. The UML is such a graphical language.
The UML is a Language for Specifying :
Specifying means building models. It specifies of all the
important analysis, design, and implementation decisions
that must be made in developing a software project.
The UML is a Language for constructing :
The UML is not a visual programming language, but its
models can be directly connected to a variety of a
programming language. This means that it is possible to
map from a model in the UML to a programming
language such as Java, C++.

The UML is a Language for Documenting :


A Healthy software organization produces all sorts of
artifacts in addition to raw executable code. These
artifacts include:
1.
2.
3.
4.
5.
6.
7.

Requirements
Architecture
Design
Source code
Project plans
Tests
Releases

The UML addresses the documentation of a systems


architecture and all of its detail

2. Architectural views of UML


The user model view :
- Use Case Diagram - The functionality of a
system The structural model view :
- Class Diagram - The static structure of a system
- Object Diagram - The static structure of a system at a
particular time The behavioral model view :
- Sequence Diagram - Interaction among elements of a system
in a time sequence
- Collaboration diagram - Interaction among elements and their
relations organized in time and space

- State Diagram - The status condition and responses of the


elements of a system
- Activity Diagram - The activities of the system
The implementation model view :
- Component Diagram - The organization of the elements
realizing the system
The Environment model view :
- Deployment diagram - Configuration of environment
elements and the mapping of elements realizing the system
into them.

3. Building Blocks of UML


Building Blocks of UML :
Things
Relationships
Diagrams.
Things in UML :
1. Structural Things:
1. Classes
2. Interfaces
3. Collaborations
4. Use Cases

5. Active Classes
6. Components
7. Nodes Classes
2. Behavioral Things:
1. Interactions
2. State Machines
3. Grouping Things:
1. Packages

4. Annotational Things:
1. Notes
Diagrams in UML:
1. Class Diagram.
2. Object Diagram.
3. Usecase Diagram.
4. Sequence Diagram.
5. Collaboration Diagram.
6. Statechart
Diagram.
7. Activity Diagram.
8. Component
Diagram.
9. Deployement
Diagram.

Class: A class is the descriptor for a set of objects with similar


structure, behavior, and relationships. It is represented by a
rectangle.

Interface: An interface is a specified for the externally-visible


operations of a class, component, or other classifier (including
subsystems) without specification of internal structure. It is
represented by a circle.

Relations:

Association
Dependency
Generalization
Realization

In addition to this there are

Directed Association
Aggregation and

Composition

Association:
An association is a structural relationship that specifies the
relation between two objects when they are at the same
level (peer level systems).
An Association can specify the relationship, role of the class
and Multiplicity.
An Association used in class diagram, Component diagram,
deployment diagram, usecase diagrams.
The multiplicity can be represented as 1-1..*,*,01.
It is represented as follows:

Directed Association:
Links a semantic association between two classes in the
UML diagram.
Directed association is used in class diagram, Component
diagram, deployment diagram, usecase diagrams.
Symbol:

Aggregation:
Links a semantic association between two classes in the
UML diagram.
Aggregation is used in class diagram.
Symbol:
Composition:
Links a semantic association between two classes in the
UML diagram.
Composition is used in class diagram.
Symbol:

Generalization:
Generalization is a specification relationship in which objects
of the specialized element (the child ) are substitutable for
objects of the generalization element (the parent).It is used in
class diagram.
Symbol:
Dependency:
A dependency is a semantic relationship in which if there is
any change occurred in one object that may effect other object.

Dependency is used in class diagram, Component


diagram, deployment diagram, usecase diagrams.

Symbol:

Realization:
Realization is a Specified tool that can be represented by
providing a relationship with classifier.
Dependency is used in class diagram, Component
diagram, deployment diagram, usecase diagrams.
Symbol:

Class diagrams:
A class diagram is that which represents a set of classes,
interfaces,

and

collaborations

and

their

relationships,

graphically a class diagram is a collection of vertices and arcs.


It consists of three compartments.

Uses:
A class diagram is used to model the static design view of a
system.
Object diagrams:
An object diagram shares the same common
properties of all other diagrams.

Uses:
An object diagram is used to model the static design view of
a system.
UseCase Diagrams:
A usecase diagram shares the common properties as all
diagrams. It distinguishes in the contents of use cases, actors,
dependency, and generalization relationships.
Symbol:-

Uses:
A Use case diagram is used to model the static design view of
a system.
Interaction Diagrams:
An Interaction diagram shares the same common properties
as all other diagrams. It differs in its contents
Objects
Links
Messages
It includes two diagrams Sequence and Collaboration.
Sequence Diagrams:
A sequence diagram emphasizes the time ordering of
messages.

Sequence

diagrams

have

two

features

that

distinguish them from collaboration diagrams.


(i)Object life time
(ii)The focus of control
Collaboration Diagrams:
A collaboration diagram emphasizes the organization of
the objects that participate in an interaction

Collaboration diagrams have two features that distinguish them


from sequence diagrams.

(i)Path
(ii) The Sequence number
Object: It is an instance of a class.
Symbol:

Stimulus:

Stimulus

is

communication

between

two

Instances that conveys information with the expectation that


action will ensue. A Stimulus will cause an Operation to be
invoked, raise a Signal, or cause an Instance to be created or
destroyed.
Symbol:
It can be annotated by a name. It has a property as Action kind.
Call:
Send:
Return:

Create:

Destroy:

Uses:
Interaction diagrams are used to model the dynamic aspects of
a system. It is obtained in two ways:
(i) To model flows of control by time ordering.
(ii) To model flows of control by
organization. State Chart Diagrams:
State: A state is a condition during the life of an object or an
interaction during which it satisfies some condition, performs
some action, or waits for some event.
It is represented by a rounded rectangle.
Symbol:

Sub machine State: A submachine state is a syntactical


convenience that facilitates reuse and modularity. It is a
shorthand that implies a macro-like expansion by another state
machine and is semantically equivalent to a composite state.
Symbol:

Initial State:
An initial is a kind of pseudo state that represents the starting
point in a region of a state machine. It has a single outgoing
transition to the default state of the enclosing region, and has
no incoming transitions. There can be one (and only one) initial
state in any given region of a state machine. It is not itself a
state but acts as a marker.
Symbol:
Final State: A final state represents the last or "final" state of
the enclosing composite state. There may be more than one
final state at any level signifying that the composite state can
end in different ways or conditions. When a final state is
reached and there are no other enclosing states it means that
the entire state machine has completed its transitions and no
more transitions can occur.

Symbol:

Junction Point: Junction Point chains together transitions into a


single run-to-completion path. May have multiple input and/or
output transitions. Each complete path involving a junction is
logically independent and only one such path fires at one time.
May be used to construct branches and merges.
Symbol:

Transition: A transition is a directed relationship between a


source state vertex and a target state vertex. It may be part of
a compound transition, which takes the state machine from one
state configuration to another, representing the complete
response of the state machine to a particular event instance.
Symbol:

Activity Diagram:
It represents the different activities in the system.
Action State: An action state represents the execution of an
atomic action, typically the invocation of an operation. An
action state is a simple state with an entry action whose only
exit transition is triggered by the implicit event of completing
the

execution

of

the

entry

action.

The

state

therefore

corresponds to the execution of the entry action itself and the


outgoing transition is activated as soon as the action has
completed its execution.
Symbol:

Sub Activity State: A sub activity state represents the execution


of a non-atomic sequence of steps that has some duration; that
is, internally it consists of a set of actions and possibly waiting
for events. That is, a sub activity state is a hierarchical action,
where an associated sub activity graph is executed.
Symbol:

Initial State: An initial is a kind of pseudo state that represents


the starting point in a region of a state machine. It has a single
outgoing transition to the default state of the enclosing region,
and has no incoming transitions. There can be one (and only
one) initial state in any given region of a state machine. It is not
itself a state but acts as a marker.
Symbol:

Final State: A final state represents the last or "final" state of


the enclosing composite state. There may be more than one
final state at any level signifying that the composite state can
end in different ways or conditions. When a final state is
reached and there are no other enclosing states it means that
the entire state machine has completed its transitions and no
more transitions can occur.
Symbol:
Decision: A state diagram (and by derivation an activity
diagram) expresses a decision when guard conditions are used
to indicate different possible transitions that depend on Boolean
conditions of the owning object.

Symbol:

Component Diagrams:

Package: A package is a grouping of model elements. Packages


themselves may be nested within other packages. A package
may contain subordinate packages as well as other kinds of
model elements. All kinds of UML model elements can be
organized into packages.
Symbol:

Interface: An interface is a specified for the externally-visible


operations of a class, component, or other classifier (including
subsystems) without specification of internal structure.
Symbol:

Component: A component represents a modular, deployable,


and

replaceable

part

of

system

that

encapsulates

implementation and exposes a set of interfaces.


Symbol:

Artifact: An Artifact represents a physical piece of information


that is used or produced by a software development process.
Examples of Artifacts include models, source files, scripts, and
binary

executable

files.

An

Artifact

may

constitute

the

implementation of a deployable component.


Symbol:

Deployment Diagrams:
Package: A package is a grouping of model elements. Packages
themselves may be nested within other packages. A package
may contain subordinate packages as well as other kinds of
model elements. All kinds of UML model elements can be
organized into packages.

Symbol:

Node: A node is a run-time physical object that represents a


computational resource, generally having at least a memory
and often processing capability as well, and upon which
components may be deployed.
Symbol:

Node Instance: A node instance is an instance of a node. A


collection of component instances may reside on the node
instance.
Symbol:

Artifact: An Artifact represents a physical piece of information that


is used or produced by a software development process.
Examples of Artifacts include models, source files, scripts, and
binary

executable

files.

An

Artifact

may

constitute

implementation of a deployable component.


Symbol:

Result:Thus, UML is introduced to the user (Student).

the

You might also like