SlideShare une entreprise Scribd logo
1  sur  39
An Introduction to UML
Unified Modeling Language
• A standard language for writing software
blueprints.
– To visualize, specify, construct, and document the artifacts of a
software-intensive system
– To create UML diagrams to help software developers build the
software.

• History
– Grady Booch, Jim Rumbaugh, and Ivar Jacobson developed UML
in the mid-1990s
– In 1997, UML 1.0 was submitted to the Object Management
Group
– UML 1.0 was revised to UML 1.1 and adopted later that year
– The current standard is UML 2.0 and is now an ISO standard
• UML 2.0 provides 13 different diagrams for
use in software modeling
– Class
– Use case
– Sequence
– Communication
– Activity
– State
– Deployment
A class diagram

• To model classes, including their attributes, operations, and their
relationships and associations with other classes
• The visibility is indicated by a preceding –, #, ~, or +
• An abstract class or abstract method is indicated by the use of italics for
the name
• An interface is indicated by adding the phrase «interface» (called a
stereotype) above the name.
A class diagram

A class diagram regarding horses
A class diagram
• a fourth section at the bottom of the class box can be used to
list the responsibilities of the class
• Generalization: a class that is a subclass of another class
• Realization: indicates implementation of an interface
A class diagram
• Association between two classes means that there is a
structural relationship between them.
– Label, as can each of its ends, to indicate the role of each class in the
association.
– Arrows on either or both ends of an association line indicate
navigability
– Multiplicity
• 0..1 means that there are 0 or 1 objects
• 1..* means one or more
• 0..* or just * means zero or more
A class diagram
• An association might also connect a class with itself,
using a loop.
• Dependency: One class depends on another if
changes to the second class might require changes to
the first class
A class diagram
• An aggregation is a special kind of association indicated by a
hollow diamond on one end of the icon
– An aggregation is a special kind of association It indicates a
“whole/part” relationship
– A composition is an aggregation indicating strong ownership of the
parts. In a composition, the parts live and die with the owner

• Note contain comments about the role of a class or
constraints that all objects of that class must satisfy.
USE-CASE DIAGRAMS
• Use cases (Chapters 5 and 6) and the UML
use-case diagram help you determine the
functionality and features of the software
from the user’s perspective.
USE-CASE DIAGRAMS
• A use case describes how a user interacts with
the system by defining the steps required to
accomplish a specific goal
• Variations in the sequence of steps describe
various scenarios
• A UML use-case diagram is an overview of all
the use cases and how they are related. It
provides a big picture of the functionality of
the system
A use-case diagram for the music system
USE-CASE DIAGRAMS
• The stick figure represents an actor that is
associated with one category of user (or other
interaction element).
• The actors are connected by lines to the use
cases that they carry out.
• To avoid duplication in use cases, it is usually
better to create a new use case representing the
duplicated activity, and then let the other uses
cases include this new use case as one of their
steps.
A use-case diagram with included use cases
SEQUENCE DIAGRAMS
• a sequence diagram is used to show the
dynamic communications between objects
during execution of a task.
• It shows the temporal order in which
messages are sent between the objects to
accomplish that task.
• One might use a sequence diagram to show
the interactions in one use case or in one
scenario of a software system.
The diagram shows the steps involved in highlighting a figure in
a drawing when it has been clicked.

A sample sequence diagram
SEQUENCE DIAGRAMS
• When an object is executing a method you can
optionally display a white bar, called an
activation bar.
• show the return from a method call with a
dashed arrow and an optional label
• A black circle with an arrow coming from it
indicates a found message whose source is
unknown or irrelevant.
SEQUENCE DIAGRAMS
• Each box in the row at the top of the diagram usually
corresponds to an object, although it is possible to
have the boxes model other things, such as classes.
• Below each box there is a dashed line called the lifeline
of the object.
• The vertical axis in the sequence diagram corresponds
to time, with time increasing as you move downward.
• A sequence diagram shows method calls using
horizontal arrows from the caller to the callee, labeled
with the method name and optionally including its
parameters, their types, and the return type.
SEQUENCE DIAGRAMS
• If you insist on including loops, conditionals,
and other control structures in a sequence
diagram, you can use interaction frames,
• which are rectangles that surround parts of
the diagram and that are labeled with the
type of control structures they represent.
• The phrases in square brackets are called
guards, which are Boolean conditions
showing the process involved in highlighting all figures inside a
given rectangle.

A sequence diagram with two interaction frames
SEQUENCE DIAGRAMS
• You can distinguish between synchronous and
asynchronous messages
• You can show an object sending itself a
message
• You can show object creation by drawing an
arrow appropriately labeled (for example, with
a «create» label)
• You can show object destruction by a big X at
the end of the object’s lifeline.
SEQUENCE DIAGRAMS

Creation, destruction, and loops in sequence diagrams
COMMUNICATION DIAGRAMS
• The UML communication diagram (called a
“collaboration diagram” in UML 1.X) provides
another indication of the temporal order of
the communications but emphasizes the
relationships among the objects and classes
instead of the temporal order.
COMMUNICATION DIAGRAMS

A UML communication diagram
COMMUNICATION DIAGRAMS
• There are many optional features that can be
added to the arrow labels.
– An incoming arrow could be labeled A1:
mouseClicked(point). indicating an execution
thread, A.
ACTIVITY DIAGRAMS
• A UML activity diagram depicts the dynamic behavior
of a system or part of a system through the flow of
control between actions that the system performs.
• an action node, represented by a rounded rectangle,
which corresponds to a task performed by the software
system.
• Arrows from one action node to another indicate the
flow of control.
• A solid black dot forms the initial node that indicates
the starting point of the activity.
• A black dot surrounded by a black circle is the final
node indicating the end of the activity.
A UML activity diagram showing how to bake a cake
ACTIVITY DIAGRAMS
• A fork represents the separation of activities
into two or more concurrent activities.
• A join is a way of synchronizing concurrent
flows of control.
• A decision node corresponds to a branch in
the flow of control based on a condition. Each
outgoing arrow is labeled with a guard (a
condition inside square brackets).
ACTIVITY DIAGRAMS
• if you do want to indicate how the actions are
divided among the participants, you can
decorate the activity diagram with swimlanes
The cakebaking activity diagram with swimlanes added
STATE DIAGRAMS
• The behavior of an object at a particular point
in time often depends on the state of the
object, that is, the values of its variables at
that time.
An introduction to uml
An introduction to uml
An introduction to uml
An introduction to uml
An introduction to uml
An introduction to uml
An introduction to uml
An introduction to uml

Contenu connexe

Tendances

M02 Uml Overview
M02 Uml OverviewM02 Uml Overview
M02 Uml Overview
Dang Tuan
 
UML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionUML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussion
CherryBerry2
 
Cs 1023 lec 10 uml (week 3)
Cs 1023 lec 10 uml (week 3)Cs 1023 lec 10 uml (week 3)
Cs 1023 lec 10 uml (week 3)
stanbridge
 

Tendances (20)

An Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence DiagramsAn Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence Diagrams
 
Uml
UmlUml
Uml
 
Uml2
Uml2Uml2
Uml2
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
UML Basics
UML BasicsUML Basics
UML Basics
 
Intro to UML 2
Intro to UML 2Intro to UML 2
Intro to UML 2
 
M02 Uml Overview
M02 Uml OverviewM02 Uml Overview
M02 Uml Overview
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
Uml
UmlUml
Uml
 
Uml unified-modeling-language-presented by dileep
Uml unified-modeling-language-presented by dileepUml unified-modeling-language-presented by dileep
Uml unified-modeling-language-presented by dileep
 
4 (uml basic)
4 (uml basic)4 (uml basic)
4 (uml basic)
 
UML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionUML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussion
 
UML
UMLUML
UML
 
Class diagram, use case and sequence diagram
Class diagram, use case and sequence diagramClass diagram, use case and sequence diagram
Class diagram, use case and sequence diagram
 
Uml with detail
Uml with detailUml with detail
Uml with detail
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
UML - Unified Modelling Language
UML - Unified Modelling LanguageUML - Unified Modelling Language
UML - Unified Modelling Language
 
UML and Software Modeling Tools.pptx
UML and Software Modeling Tools.pptxUML and Software Modeling Tools.pptx
UML and Software Modeling Tools.pptx
 
What is UML (Unified Modeling Language)?
What is UML (Unified Modeling Language)?What is UML (Unified Modeling Language)?
What is UML (Unified Modeling Language)?
 
Cs 1023 lec 10 uml (week 3)
Cs 1023 lec 10 uml (week 3)Cs 1023 lec 10 uml (week 3)
Cs 1023 lec 10 uml (week 3)
 

En vedette

Rtrt regulatory perspectiv on real time release testing 27-oct_2011
Rtrt regulatory perspectiv on real time release testing 27-oct_2011Rtrt regulatory perspectiv on real time release testing 27-oct_2011
Rtrt regulatory perspectiv on real time release testing 27-oct_2011
lastrajl
 
Real time release testing
Real time release testing Real time release testing
Presentation - Rational Unified Process
Presentation - Rational Unified ProcessPresentation - Rational Unified Process
Presentation - Rational Unified Process
Sharad Srivastava
 
INTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSINTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMS
Ashita Agrawal
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
mewaseem
 

En vedette (18)

Rtrt regulatory perspectiv on real time release testing 27-oct_2011
Rtrt regulatory perspectiv on real time release testing 27-oct_2011Rtrt regulatory perspectiv on real time release testing 27-oct_2011
Rtrt regulatory perspectiv on real time release testing 27-oct_2011
 
Lecture 3 Software Engineering and Design Introduction to UML
Lecture 3 Software Engineering and Design Introduction to UMLLecture 3 Software Engineering and Design Introduction to UML
Lecture 3 Software Engineering and Design Introduction to UML
 
Real time release testing
Real time release testing Real time release testing
Real time release testing
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
New EMA Guidance on Real Time Release Testing.
New EMA Guidance on Real Time Release Testing.New EMA Guidance on Real Time Release Testing.
New EMA Guidance on Real Time Release Testing.
 
Near Infrared Spectroscopy In Off Line Biomass Monitoring Of Candida Utilis C...
Near Infrared Spectroscopy In Off Line Biomass Monitoring Of Candida Utilis C...Near Infrared Spectroscopy In Off Line Biomass Monitoring Of Candida Utilis C...
Near Infrared Spectroscopy In Off Line Biomass Monitoring Of Candida Utilis C...
 
Swati nir
Swati nirSwati nir
Swati nir
 
Iterative Incremental development
Iterative Incremental developmentIterative Incremental development
Iterative Incremental development
 
Iterative model
Iterative modelIterative model
Iterative model
 
Presentation - Rational Unified Process
Presentation - Rational Unified ProcessPresentation - Rational Unified Process
Presentation - Rational Unified Process
 
Unified process
Unified processUnified process
Unified process
 
INTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSINTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMS
 
Ooad Uml
Ooad UmlOoad Uml
Ooad Uml
 
UML- Unified Modeling Language
UML- Unified Modeling LanguageUML- Unified Modeling Language
UML- Unified Modeling Language
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
 
Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...
Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...
Employee Management System UML Diagrams Use Case Diagram, Activity Diagram, S...
 
Unified Process
Unified ProcessUnified Process
Unified Process
 

Similaire à An introduction to uml

UNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptxUNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptx
viju001
 
UML Diagrams.ppt
UML Diagrams.pptUML Diagrams.ppt
UML Diagrams.ppt
jeyasrig
 
UML Design Document Training Learn UML .pptx
UML Design Document Training Learn UML .pptxUML Design Document Training Learn UML .pptx
UML Design Document Training Learn UML .pptx
raghavanp4
 
Lecture#03, uml diagrams
Lecture#03, uml diagramsLecture#03, uml diagrams
Lecture#03, uml diagrams
babak danyal
 
Selab1 slides
Selab1 slidesSelab1 slides
Selab1 slides
Sumedha
 

Similaire à An introduction to uml (20)

UML tutorial
UML tutorialUML tutorial
UML tutorial
 
Chapter3
Chapter3Chapter3
Chapter3
 
Case Study Uml
Case Study UmlCase Study Uml
Case Study Uml
 
Uml
UmlUml
Uml
 
UNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptxUNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptx
 
UML Diagrams_UNIT III.ppt
UML Diagrams_UNIT III.pptUML Diagrams_UNIT III.ppt
UML Diagrams_UNIT III.ppt
 
UML Diagrams.ppt
UML Diagrams.pptUML Diagrams.ppt
UML Diagrams.ppt
 
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
Class diagrams are a type of UML (Unified Modeling Language) diagram used in ...
 
Uml Diagrams
Uml DiagramsUml Diagrams
Uml Diagrams
 
UML Diagrams.ppt
UML Diagrams.pptUML Diagrams.ppt
UML Diagrams.ppt
 
Uml overview modified
Uml overview modifiedUml overview modified
Uml overview modified
 
Modeling software with UML
Modeling software with UMLModeling software with UML
Modeling software with UML
 
CASE Tools lab.ppt
CASE Tools lab.pptCASE Tools lab.ppt
CASE Tools lab.ppt
 
UML Design Document Training Learn UML .pptx
UML Design Document Training Learn UML .pptxUML Design Document Training Learn UML .pptx
UML Design Document Training Learn UML .pptx
 
1. introduction to uml
1. introduction to uml1. introduction to uml
1. introduction to uml
 
Lect-4: UML diagrams - Unified Modeling Language - SPM
Lect-4: UML diagrams - Unified Modeling Language - SPMLect-4: UML diagrams - Unified Modeling Language - SPM
Lect-4: UML diagrams - Unified Modeling Language - SPM
 
The Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialThe Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram Tutorial
 
Lecture#03, uml diagrams
Lecture#03, uml diagramsLecture#03, uml diagrams
Lecture#03, uml diagrams
 
UML Trainings
UML TrainingsUML Trainings
UML Trainings
 
Selab1 slides
Selab1 slidesSelab1 slides
Selab1 slides
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Dernier (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 

An introduction to uml

  • 1. An Introduction to UML Unified Modeling Language
  • 2. • A standard language for writing software blueprints. – To visualize, specify, construct, and document the artifacts of a software-intensive system – To create UML diagrams to help software developers build the software. • History – Grady Booch, Jim Rumbaugh, and Ivar Jacobson developed UML in the mid-1990s – In 1997, UML 1.0 was submitted to the Object Management Group – UML 1.0 was revised to UML 1.1 and adopted later that year – The current standard is UML 2.0 and is now an ISO standard
  • 3. • UML 2.0 provides 13 different diagrams for use in software modeling – Class – Use case – Sequence – Communication – Activity – State – Deployment
  • 4. A class diagram • To model classes, including their attributes, operations, and their relationships and associations with other classes • The visibility is indicated by a preceding –, #, ~, or + • An abstract class or abstract method is indicated by the use of italics for the name • An interface is indicated by adding the phrase «interface» (called a stereotype) above the name.
  • 5. A class diagram A class diagram regarding horses
  • 6. A class diagram • a fourth section at the bottom of the class box can be used to list the responsibilities of the class • Generalization: a class that is a subclass of another class • Realization: indicates implementation of an interface
  • 7. A class diagram • Association between two classes means that there is a structural relationship between them. – Label, as can each of its ends, to indicate the role of each class in the association. – Arrows on either or both ends of an association line indicate navigability – Multiplicity • 0..1 means that there are 0 or 1 objects • 1..* means one or more • 0..* or just * means zero or more
  • 8. A class diagram • An association might also connect a class with itself, using a loop. • Dependency: One class depends on another if changes to the second class might require changes to the first class
  • 9. A class diagram • An aggregation is a special kind of association indicated by a hollow diamond on one end of the icon – An aggregation is a special kind of association It indicates a “whole/part” relationship – A composition is an aggregation indicating strong ownership of the parts. In a composition, the parts live and die with the owner • Note contain comments about the role of a class or constraints that all objects of that class must satisfy.
  • 10. USE-CASE DIAGRAMS • Use cases (Chapters 5 and 6) and the UML use-case diagram help you determine the functionality and features of the software from the user’s perspective.
  • 11. USE-CASE DIAGRAMS • A use case describes how a user interacts with the system by defining the steps required to accomplish a specific goal • Variations in the sequence of steps describe various scenarios • A UML use-case diagram is an overview of all the use cases and how they are related. It provides a big picture of the functionality of the system
  • 12. A use-case diagram for the music system
  • 13. USE-CASE DIAGRAMS • The stick figure represents an actor that is associated with one category of user (or other interaction element). • The actors are connected by lines to the use cases that they carry out. • To avoid duplication in use cases, it is usually better to create a new use case representing the duplicated activity, and then let the other uses cases include this new use case as one of their steps.
  • 14. A use-case diagram with included use cases
  • 15. SEQUENCE DIAGRAMS • a sequence diagram is used to show the dynamic communications between objects during execution of a task. • It shows the temporal order in which messages are sent between the objects to accomplish that task. • One might use a sequence diagram to show the interactions in one use case or in one scenario of a software system.
  • 16. The diagram shows the steps involved in highlighting a figure in a drawing when it has been clicked. A sample sequence diagram
  • 17. SEQUENCE DIAGRAMS • When an object is executing a method you can optionally display a white bar, called an activation bar. • show the return from a method call with a dashed arrow and an optional label • A black circle with an arrow coming from it indicates a found message whose source is unknown or irrelevant.
  • 18. SEQUENCE DIAGRAMS • Each box in the row at the top of the diagram usually corresponds to an object, although it is possible to have the boxes model other things, such as classes. • Below each box there is a dashed line called the lifeline of the object. • The vertical axis in the sequence diagram corresponds to time, with time increasing as you move downward. • A sequence diagram shows method calls using horizontal arrows from the caller to the callee, labeled with the method name and optionally including its parameters, their types, and the return type.
  • 19. SEQUENCE DIAGRAMS • If you insist on including loops, conditionals, and other control structures in a sequence diagram, you can use interaction frames, • which are rectangles that surround parts of the diagram and that are labeled with the type of control structures they represent. • The phrases in square brackets are called guards, which are Boolean conditions
  • 20. showing the process involved in highlighting all figures inside a given rectangle. A sequence diagram with two interaction frames
  • 21. SEQUENCE DIAGRAMS • You can distinguish between synchronous and asynchronous messages • You can show an object sending itself a message • You can show object creation by drawing an arrow appropriately labeled (for example, with a «create» label) • You can show object destruction by a big X at the end of the object’s lifeline.
  • 22. SEQUENCE DIAGRAMS Creation, destruction, and loops in sequence diagrams
  • 23. COMMUNICATION DIAGRAMS • The UML communication diagram (called a “collaboration diagram” in UML 1.X) provides another indication of the temporal order of the communications but emphasizes the relationships among the objects and classes instead of the temporal order.
  • 24. COMMUNICATION DIAGRAMS A UML communication diagram
  • 25. COMMUNICATION DIAGRAMS • There are many optional features that can be added to the arrow labels. – An incoming arrow could be labeled A1: mouseClicked(point). indicating an execution thread, A.
  • 26. ACTIVITY DIAGRAMS • A UML activity diagram depicts the dynamic behavior of a system or part of a system through the flow of control between actions that the system performs. • an action node, represented by a rounded rectangle, which corresponds to a task performed by the software system. • Arrows from one action node to another indicate the flow of control. • A solid black dot forms the initial node that indicates the starting point of the activity. • A black dot surrounded by a black circle is the final node indicating the end of the activity.
  • 27. A UML activity diagram showing how to bake a cake
  • 28. ACTIVITY DIAGRAMS • A fork represents the separation of activities into two or more concurrent activities. • A join is a way of synchronizing concurrent flows of control. • A decision node corresponds to a branch in the flow of control based on a condition. Each outgoing arrow is labeled with a guard (a condition inside square brackets).
  • 29. ACTIVITY DIAGRAMS • if you do want to indicate how the actions are divided among the participants, you can decorate the activity diagram with swimlanes
  • 30. The cakebaking activity diagram with swimlanes added
  • 31. STATE DIAGRAMS • The behavior of an object at a particular point in time often depends on the state of the object, that is, the values of its variables at that time.