SlideShare ist ein Scribd-Unternehmen logo
1 von 47
WELCOME TO UML
• Created By:- HEMANT RAJAK
• This presentation is only for
• NIIT students
1
Unified Modeling Language
1. Introduction
2. Use case diagram
3. Activity diagram
4. Class diagram
5. State machine diagram
6. Other diagrams of interest
7. UML in the software process
Created by :- HEMANT RAJAK
1. Introduction:
Origins of UML
4
Origins of UML
• In the 1980s, object-oriented programming moved from research labs into
the real world
• Smalltalk and C++ became popular languages and various people started
thinking about object-oriented graphical design languages
• Between 1988 and 1992, the key authors were Booch, Coad, Jacobson,
Odell, Rumbaugh, Shlaer, Mellor, and Wirfs-Brock
– Each author was informally leading a group of practitioners who liked those
ideas
– The same basic OO concepts would reappear in very different notations,
causing confusion with clients
• When Jim Rumbaugh left GE to join Grady Booch at Rational, an alliance
was formed and a critical mass of market share occurred
• In 1997, Rational released UML 1.0
5
Origins of UML (continued)
• Consists of a family of graphical notations that help in describing and
designing software systems
• Focuses particularly on software systems built using the object-
oriented style
• Controlled by the Object Management Group, which is an open
consortium of companies
• Comes from the unification of many OO graphical modeling
languages that thrived in the 1980s and early 1990s
1. Introduction:
Ways of using UML
7
As a Sketch
• Most common use of UML
• Used to help communicate some aspect of a system and to better
understand it
• Used for both forward engineering (i.e., build diagrams before coding)
and reverse engineering (i.e., build diagrams from existing code)
• Strives to be informal and dynamic
• Only emphasizes those classes, attributes, operations, and relationships
that are of interest
• More concerned with selective communication than complete
specification
8
As a Blueprint
• Goal is completeness
• Is more definitive, while the sketch approach is more explorative
• Used to describe a detailed design for a programmer to follow in
writing source code
• Notation should be sufficiently complete so that a programmer can
follow it in a straightforward manner
• Can be used by a designer to develop blueprint-level models that show
interfaces of subsystems or classes
– Developers then work out the implementation details
• As a reversed engineered product, diagrams convey detailed
information about the source code that is easier for developers to
understand
9
As a Programming Language
• Specifies the complete system in UML so that code can be
automatically generated
• Looks at UML from a software perspective rather than a conceptual
perspective which concentrates on the domain of study
• Diagrams are compiled directly into executable code so that the UML
becomes the source code
• Challenge is making it more productive to use UML rather than some
another programming language
• Another concern is how to model behavioral logic
– Done with interaction diagrams, state diagrams, and activity diagrams
10
Comparing and Contrasting
Ways of Using UML
• UML sketches are useful with both forward and reverse engineering
and in both conceptual and software perspectives
• Detailed forward engineering blueprints are difficult to do well and
slow down the development effort
– Actual implementation of interfaces will reveal the needs for changes
• The value of reversed engineered blueprints depends on the CASE
tool
– A dynamic browser would be very helpful; a thick document wastes time
and resources
• UML as a programming language will probably never see significant
usage
– Graphical forms have not shown to be more productive in writing code
than textual code for most programming tasks
1. Introduction:
UML Diagrams
12
Types of UML Diagrams
Diagram Name Purpose
Activity Models procedural and parallel behavior
Class (*) Models classes, attributes, operations and relationships
Communication Models interaction between objects
Component Models structure and connection of components
Composite Structure Models runtime decomposition of a class
Deployment Models deployment of artifacts to nodes
Interaction overview Mixes the sequence and activity diagram
(more on next slide)
13
Types of UML Diagrams
(continued)
Diagram Name Purpose
Object Models example configurations of instances
Package Models compile-time hierarchical structure
Sequence Models sequence interaction between objects
State Machine (*) Models how events change an object over its life
Timing Models timing interaction between objects
Use Case (*) Models how users interact with a system
(*) Denotes diagrams that we will use in this course
14
Classification of Diagram Types
Diagram
Behavior
Diagram
Structure
Diagram
Class
Diagram
Composite
Structure Diagram
Object
Diagram
Activity
Diagram
Use Case
Diagram
State Machine
Diagram
Interaction
Diagram
Component
Diagram
Deployment
Diagram
Package
Diagram
Sequence
Diagram
Communication
Diagram
Interaction
Overview
Diagram
Timing
Diagram
2. Use Case Diagram
16
Use Case Diagram
• Use cases serve as a technique for capturing the functional
requirements of a system
• Describes the typical interactions between the users of a system and
the system itself, providing a narrative of how a system is used
• A use case consists of a set of one or more scenarios tied together by a
common user goal
• A scenario is a sequence of steps describing an interaction between a
user and a system; some scenarios describe successful interaction;
others describe failure or errors
• Users are referred to as actors; an actor is a role that carries out a use
case
• An actor need not always be a person; it can also be an external system
that is either automated or manual
17
Use Case Diagram (continued)
• A use case diagram is like a graphical table of contents of the use
cases for a system
– It shows the use cases, the actors, and the relationships between them
• Use cases represent an external view of the system; consequently, they
have no correlation to the classes in the system
– They can serve as a starting point for writing software validation test
cases
18
Example Use Case Diagram
Make automated menu
selections
Order food and drink
Pay for food and drink
Notify customer that
food and drink are ready
Customer
Cook
Payment
System
Expert Menu
System
3. Activity Diagram
20
Activity Diagram
• Serves as a technique to describe procedural logic, business process
logic, and work flow
• Is similar to a flowchart except that it can also show parallel behavior
• States the essential sequencing rules to follow, thereby allowing
concurrent algorithms to be used
– Consequently, an activity diagram allows whoever is doing the process to
choose the order in which to do certain things
• Can be used to describe the actions in a use case
21
Example Activity Diagram
Set counter = positive n
Set accumulator = initial value
n > 1
Set accumulator = accumulator * n
Set n = n - 1
(n mod 5) == 0
Display accumulator value
Return accumulator value
T
F
T
F
4. Class Diagram
23
Class Diagram
• Describes the types of objects in the system and the various kinds of
static relationships that exist among them
• Also shows the properties and operations of a class and the constraints
that apply to the way objects are connected
• A class box has three parts:
– Name of the class
– Attributes of the class
– Operations of the class
• Properties represent structural features of a class and consist of
attributes and associations
Name
Attributes
Operations
24
Attribute
• Example
+ criticalMsg: String [1] = "Error message" {readonly}
• Syntax
– Visibility marker: public (+) or private (-)
– Name: name of the attribute in the programming language
– Type: Type of the attribute in the programming language
– Multiplicity: how many objects fill the property
– Default: Default value of the attribute at instantiation
– {property-string}: additional properties of the attribute
• Describes a property as a line of text within the class box
• Used for representing value types
visibility name: type multiplicity = default {property-string}
25
Association
• Represented by a solid line between two classes directed from the
source class to the target class
• Used for representing (i.e., pointing to) object types
• The name of the association goes at the target end of the association
together
• The target end of the association links to the class that is the type of
the property
• Multiplicities can be shown at both ends but are usually at the target
end
• Arrows may be bidirectional
1..nSource Target
Name
26
Aggregation and Composition
• Aggregation and composition are sometimes viewed as special types
of associations and have their own UML symbol of a diamond at the
source end of a line
• Aggregation is a part-of relationship
• Composition is more restrictive than aggregation
– The diamond is filled in (i.e. shaded)
– The part pointed to does not continue to exist without the whole
1..nSource Target
Name
27
Operation
• Example: + computeTotal (account: Account) : float
• Syntax
– Visibility marker: public (+) or private (-)
– Name: name of the operation in the programming language
– Parameter-list: list of parameters passed to the operation
• Syntax: direction name : type = default-value
• Direction is (in), (out), or (inout); default is (in)
– Return-type: Type of the return value if there is one
– {property-string}: additional properties of the operation
• Portrays actions that a class knows to carry out
• Corresponds to the methods of a class
• Operations may be queries or modifiers; modifiers change the state of
any object
• Set and get operations are implied and therefore not shown
visibility name (parameter-list) : return-type {property-string}
28
Generalization
• Portrays inheritance between a super class and a subclass
• Is represented by a line with a triangle at the target end as shown below
Super class
Subclass Subclass
29
Dependency
• A dependency exists between two elements if changes to the definition
of one element (i.e., the source or supplier) may cause changes to the
other element (i.e., the client)
• Examples
– One class sends a message to another class
– One class mentions another as a parameter to an operation
• Once a dependency is created, if a class changes its interface, any
message sent to that class may no longer be valid
• A general rule is to minimize dependencies and be wary of cycles
Class
Class
30
Example Class Diagram
1..n
Production
Manager
Auditor Record
Keeper
Report
Generator
Transaction
Processor
Account
Accounts
Payable
Accounts
Receivable
Input
Verifier
Error Log Input Handler
Local File
Handler
Remote File
Handler
Account List
Accountant
31
When to Use Class Diagrams
• Class diagrams are the backbone of UML and are the most used
diagrams
• Normally use only a subset of the notations available: class box,
attributes, operations, association, aggregation, and generalization
• Class diagrams only model software structure; consequently, it is easy
to get too focused on class diagrams and ignore behavior
– Use a state diagram to model the behavior of a class
– Use a sequence diagram to model interactions (i.e., behavior) among
objects of various classes
5. State Machine Diagram
33
State Machine Diagram
• Commonly called a state diagram
• A state diagram describes the behavior of a system
• In object-oriented technology, a state diagram shows the lifetime behavior
of a single object
• A state diagram captures the behavior of a state across several use cases
• A state diagram consists of states and transitions
– Note that a state diagram is NOT a set of processes connected by lines
representing data input and output
• A state is characterized by the current values of an object's attributes and
its name reflects some ongoing activity or state
• A transition indicates a movement from one state to another because an
event has occurred; this transition changes one or more attribute values of
the class
34
Transition
• Syntax
– Trigger-signature: a single event that triggers a potential change of state
– Guard: a Boolean condition that must be true for the transition to be taken
– Activity: some behavior that is executed during the transition
• All three parts of the transition label are optional
– A missing guard means the transition is taken every time the event occurs
– A missing activity indicates that nothing extra is done during the transition
– A missing trigger-signature is rare; this means the transition is immediately taken
and usually occurs in activity states
• When an event occurs in a state, each corresponding transition out of the state
must be unique
• Multiple transitions with the same event must have guards on them that are
mutually exclusive; otherwise its non-deterministic
• If an event occurs for which there is no transition labeled, then the event is
ignored in that state
trigger-signature [guard]/activity
35
Activity State
• In some states, an object is inactive as it waits for the next event
before it does something
• In an activity state, the object is doing some ongoing work
– The work may take a finite amount of time
– A transition from the state cannot occur until the work is done
– This is represented by "do/ activity" notation in the state box
36
Example State Diagram
Empty
Stack
Partially
Filled Stack
Full Stack
push
pop [n == 1]
push [n - 1 == max]
push [n – 2 < max]
pop [n > 1]
pop [n == max]
pop / return error
push [n >= max] / set n to max; return error
37
Three Ways to Implement a State
Diagram in Source Code
• A double-nested switch statement
– Each case label in a switch has its own internal switch statement
– The case labels of the external switch are various states
– The case labels of each internal switch are events
– Guards are implemented as Boolean conditions
• A state table with columns for source state, target state, event, guard,
and activity
• The state pattern, which creates a hierarchy of state classes to handle
behavior of the states
6. Other Diagrams of Interest
39
Sequence Diagram
• Captures the behavior of a single scenario in a use case
• Shows a number of example objects and messages that are passed between
those objects within the use case
• The columns of the diagram represent each object involved in the use case
• The life time of an object progresses from the top of the diagram to the
bottom
• Clearly illustrates the calls between participants and the sequence of those
calls
• Gives a good picture about which participants are doing which processing
40
Sequence Diagram (continued)
• Can exhibit centralized control or distributed control
– In centralized control, one participant does all of the processing
– In distributed control, processing is split among many participants
– Distributed control gives more opportunities for using polymorphism rather than
using conditional logic
• Use a sequence diagram when you want to look at the behavior of several
objects within a single use case
• When not to use a sequence diagram
– If you want to look at the behavior of a single object across many use cases, use a
state diagram
– If you want to look at the behavior of several objects across many scenarios, use
an activity diagram
41
Object Diagram
• Represents a snapshot of the objects in a system at a point in time
• Shows instances rather than classes, therefore it is sometimes called an
instance diagram
• When to use object diagrams
– To show examples of objects connected together based on a specific
multiplicity number
– To show instances with values for their attributes
42
Package Diagram
• Used to take any construct in UML and group its elements together
into higher-level units
• Used most often to group classes
• Corresponds to the package concept in Java
• Represented by a tabbed folder, where the tab contains the package
name
• Can show dependencies between packages
– The more dependencies coming into a package, the more stable its
interface needs to be
43
Deployment Diagram
• Shows a system's physical layout, revealing which pieces of software
run on which computer platforms
• Uses rectangles to represent nodes and lines to represent
communication paths between nodes
– Nodes contain artifacts, which are the physical manifestations of software
(i.e., executable and data files)
– Listing an artifact in a node shows that the artifact is deployed to that
node in the running system
– Artifacts can be shown either as class boxes or by just listing the name in
the node
– Communication paths can be labeled based on the protocols that they use
• Can be used as a configuration management tool to show an "as is"
system architecture and a proposed "to be" system architecture for an
organization
7. UML in the Software Process
45
Fitting UML into
Software Requirements Analysis
• A use case diagram helps describe how people interact with the system
• An activity diagram shows the context for use cases and also the
details of how a complicated use case works
• A class diagram drawn from the conceptual perspective is a good way
of building up a rigorous vocabulary of the domain
– It also shows the attributes and operations of interest in domain classes
and the relationships among the classes
• A state diagram shows the various states of a domain class and events
that change that state
46
Fitting UML into
Software Design
• A class diagram drawn from the software perspective can show design
classes, their attributes and operations, and their relationships with the
domain classes
• A sequence diagram helps to combine use cases in order to see what
happens in the software
• A package diagram shows the large-scale organization of the software
• A state diagram shows the various states of a design object and events
that change that state
• A deployment diagram shows the physical layout of the software
47
Fitting UML into
Software Documentation
• Complements the written documentation and in some instances can
replace it
• Captures the outcome of the requirements analysis and design
activities in a graphical format
• Supplies a software maintainer with an overall understanding of a
system
• Provides a good logical roadmap of the system layout
• Describes the various states in which a system may exist
• Details complex algorithms in a more understandable form
• Shows how multiple objects collaborate in the system


Weitere ähnliche Inhalte

Was ist angesagt?

Arch06 1
Arch06 1Arch06 1
Arch06 1nazn
 
UNIFIED MODELING LANGUAGE
UNIFIED MODELING LANGUAGEUNIFIED MODELING LANGUAGE
UNIFIED MODELING LANGUAGERaval Chirag
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentationanasz3z3
 
Object oriented analysis and design
Object oriented analysis and designObject oriented analysis and design
Object oriented analysis and designnaveed428
 
Uml with detail
Uml with detailUml with detail
Uml with detailHamza Khan
 
Object Oriented Analysis Design using UML
Object Oriented Analysis Design using UMLObject Oriented Analysis Design using UML
Object Oriented Analysis Design using UMLAjit Nayak
 
Information Systems Analysis and Design Overview of OOAD, UML, and RUP
 Information Systems Analysis and Design Overview of OOAD, UML, and RUP Information Systems Analysis and Design Overview of OOAD, UML, and RUP
Information Systems Analysis and Design Overview of OOAD, UML, and RUPDang Tuan
 
Round - Trip Software Engineering using UML: From Architecture to Design and...
Round - Trip Software Engineering using UML:  From Architecture to Design and...Round - Trip Software Engineering using UML:  From Architecture to Design and...
Round - Trip Software Engineering using UML: From Architecture to Design and...Aman Mishra
 
Lecture 4-oop class diagram
Lecture 4-oop class diagramLecture 4-oop class diagram
Lecture 4-oop class diagramktuonlinenotes
 
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 DiagramsMohammed Misbhauddin
 
UML and Case study
UML and Case study UML and Case study
UML and Case study Mihika-QA
 

Was ist angesagt? (19)

Arch06 1
Arch06 1Arch06 1
Arch06 1
 
UNIFIED MODELING LANGUAGE
UNIFIED MODELING LANGUAGEUNIFIED MODELING LANGUAGE
UNIFIED MODELING LANGUAGE
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
 
Object oriented analysis and design
Object oriented analysis and designObject oriented analysis and design
Object oriented analysis and design
 
UML
UMLUML
UML
 
Uml with detail
Uml with detailUml with detail
Uml with detail
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
Object Oriented Analysis Design using UML
Object Oriented Analysis Design using UMLObject Oriented Analysis Design using UML
Object Oriented Analysis Design using UML
 
Unit 2
Unit 2Unit 2
Unit 2
 
Information Systems Analysis and Design Overview of OOAD, UML, and RUP
 Information Systems Analysis and Design Overview of OOAD, UML, and RUP Information Systems Analysis and Design Overview of OOAD, UML, and RUP
Information Systems Analysis and Design Overview of OOAD, UML, and RUP
 
Ooad unit 1
Ooad unit 1Ooad unit 1
Ooad unit 1
 
Round - Trip Software Engineering using UML: From Architecture to Design and...
Round - Trip Software Engineering using UML:  From Architecture to Design and...Round - Trip Software Engineering using UML:  From Architecture to Design and...
Round - Trip Software Engineering using UML: From Architecture to Design and...
 
CS8592-OOAD Lecture Notes Unit-1
CS8592-OOAD Lecture Notes Unit-1CS8592-OOAD Lecture Notes Unit-1
CS8592-OOAD Lecture Notes Unit-1
 
Lecture 4-oop class diagram
Lecture 4-oop class diagramLecture 4-oop class diagram
Lecture 4-oop class diagram
 
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
 
Ooad
OoadOoad
Ooad
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
Presentation on uml
Presentation on umlPresentation on uml
Presentation on uml
 
UML and Case study
UML and Case study UML and Case study
UML and Case study
 

Andere mochten auch

Introducing c# (hemant)
Introducing c# (hemant)Introducing c# (hemant)
Introducing c# (hemant)hrajak5
 
Neil Killick - What do you want to improve? Scaling:doing:being agile isn't ...
Neil Killick  - What do you want to improve? Scaling:doing:being agile isn't ...Neil Killick  - What do you want to improve? Scaling:doing:being agile isn't ...
Neil Killick - What do you want to improve? Scaling:doing:being agile isn't ...Scrum Australia Pty Ltd
 
Equity news for beginners
Equity news for beginnersEquity news for beginners
Equity news for beginnersRiya jain
 
IHC 2012 | Interação entre time de Design de Interfaces e time de Desenvolvim...
IHC 2012 | Interação entre time de Design de Interfaces e time de Desenvolvim...IHC 2012 | Interação entre time de Design de Interfaces e time de Desenvolvim...
IHC 2012 | Interação entre time de Design de Interfaces e time de Desenvolvim...Viviane Delvequio
 
Essential commodities act, 1955
Essential commodities act, 1955Essential commodities act, 1955
Essential commodities act, 1955amitgurus
 

Andere mochten auch (6)

Introducing c# (hemant)
Introducing c# (hemant)Introducing c# (hemant)
Introducing c# (hemant)
 
Neil Killick - What do you want to improve? Scaling:doing:being agile isn't ...
Neil Killick  - What do you want to improve? Scaling:doing:being agile isn't ...Neil Killick  - What do you want to improve? Scaling:doing:being agile isn't ...
Neil Killick - What do you want to improve? Scaling:doing:being agile isn't ...
 
Equity news for beginners
Equity news for beginnersEquity news for beginners
Equity news for beginners
 
IHC 2012 | Interação entre time de Design de Interfaces e time de Desenvolvim...
IHC 2012 | Interação entre time de Design de Interfaces e time de Desenvolvim...IHC 2012 | Interação entre time de Design de Interfaces e time de Desenvolvim...
IHC 2012 | Interação entre time de Design de Interfaces e time de Desenvolvim...
 
The Role Model of India Saheed Bhagat Singh
The Role Model of India Saheed Bhagat SinghThe Role Model of India Saheed Bhagat Singh
The Role Model of India Saheed Bhagat Singh
 
Essential commodities act, 1955
Essential commodities act, 1955Essential commodities act, 1955
Essential commodities act, 1955
 

Ähnlich wie UML (Hemant rajak)

1. introduction to uml
1. introduction to uml1. introduction to uml
1. introduction to umlPRABU M
 
analysis and design with uml
analysis and design with umlanalysis and design with uml
analysis and design with umlsabin kafle
 
CS6502 OOAD - Question Bank and Answer
CS6502 OOAD - Question Bank and AnswerCS6502 OOAD - Question Bank and Answer
CS6502 OOAD - Question Bank and AnswerGobinath Subramaniam
 
lecture8UML Diagrams.pptx
lecture8UML Diagrams.pptxlecture8UML Diagrams.pptx
lecture8UML Diagrams.pptxGracePeter10
 
FSD MICRO PROJECT UML PPT.pptx
FSD MICRO PROJECT UML PPT.pptxFSD MICRO PROJECT UML PPT.pptx
FSD MICRO PROJECT UML PPT.pptxThorOdinson55
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML DiagramsManish Kumar
 
Modeling software with UML
Modeling software with UMLModeling software with UML
Modeling software with UML6020 peaks
 
CIS110 Computer Programming Design Chapter (13)
CIS110 Computer Programming Design Chapter  (13)CIS110 Computer Programming Design Chapter  (13)
CIS110 Computer Programming Design Chapter (13)Dr. Ahmed Al Zaidy
 
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 .pptxraghavanp4
 
Unit-II(STATIC UML DIAGRAMS).ppt
Unit-II(STATIC UML DIAGRAMS).pptUnit-II(STATIC UML DIAGRAMS).ppt
Unit-II(STATIC UML DIAGRAMS).pptganeshkarthy
 
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
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manualPraseela R
 
clean architecture uncle bob AnalysisAndDesign.el.en.pptx
clean architecture uncle bob AnalysisAndDesign.el.en.pptxclean architecture uncle bob AnalysisAndDesign.el.en.pptx
clean architecture uncle bob AnalysisAndDesign.el.en.pptxsaber tabatabaee
 

Ähnlich wie UML (Hemant rajak) (20)

1. introduction to uml
1. introduction to uml1. introduction to uml
1. introduction to uml
 
analysis and design with uml
analysis and design with umlanalysis and design with uml
analysis and design with uml
 
CS6502 OOAD - Question Bank and Answer
CS6502 OOAD - Question Bank and AnswerCS6502 OOAD - Question Bank and Answer
CS6502 OOAD - Question Bank and Answer
 
lecture8UML Diagrams.pptx
lecture8UML Diagrams.pptxlecture8UML Diagrams.pptx
lecture8UML Diagrams.pptx
 
FSD MICRO PROJECT UML PPT.pptx
FSD MICRO PROJECT UML PPT.pptxFSD MICRO PROJECT UML PPT.pptx
FSD MICRO PROJECT UML PPT.pptx
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML Diagrams
 
Modeling software with UML
Modeling software with UMLModeling software with UML
Modeling software with UML
 
UML Modeling in Java
UML Modeling in JavaUML Modeling in Java
UML Modeling in Java
 
CIS110 Computer Programming Design Chapter (13)
CIS110 Computer Programming Design Chapter  (13)CIS110 Computer Programming Design Chapter  (13)
CIS110 Computer Programming Design Chapter (13)
 
uml.ppt
uml.pptuml.ppt
uml.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
 
Unit-II(STATIC UML DIAGRAMS).ppt
Unit-II(STATIC UML DIAGRAMS).pptUnit-II(STATIC UML DIAGRAMS).ppt
Unit-II(STATIC UML DIAGRAMS).ppt
 
Cs8592 ooad unit 1
Cs8592 ooad unit 1Cs8592 ooad unit 1
Cs8592 ooad unit 1
 
Cs8592 ooad unit 1
Cs8592 ooad unit 1Cs8592 ooad unit 1
Cs8592 ooad unit 1
 
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)
 
UML tutorial
UML tutorialUML tutorial
UML tutorial
 
graph
graphgraph
graph
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manual
 
clean architecture uncle bob AnalysisAndDesign.el.en.pptx
clean architecture uncle bob AnalysisAndDesign.el.en.pptxclean architecture uncle bob AnalysisAndDesign.el.en.pptx
clean architecture uncle bob AnalysisAndDesign.el.en.pptx
 

Kürzlich hochgeladen

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 

Kürzlich hochgeladen (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 

UML (Hemant rajak)

  • 1. WELCOME TO UML • Created By:- HEMANT RAJAK • This presentation is only for • NIIT students 1
  • 2. Unified Modeling Language 1. Introduction 2. Use case diagram 3. Activity diagram 4. Class diagram 5. State machine diagram 6. Other diagrams of interest 7. UML in the software process Created by :- HEMANT RAJAK
  • 4. 4 Origins of UML • In the 1980s, object-oriented programming moved from research labs into the real world • Smalltalk and C++ became popular languages and various people started thinking about object-oriented graphical design languages • Between 1988 and 1992, the key authors were Booch, Coad, Jacobson, Odell, Rumbaugh, Shlaer, Mellor, and Wirfs-Brock – Each author was informally leading a group of practitioners who liked those ideas – The same basic OO concepts would reappear in very different notations, causing confusion with clients • When Jim Rumbaugh left GE to join Grady Booch at Rational, an alliance was formed and a critical mass of market share occurred • In 1997, Rational released UML 1.0
  • 5. 5 Origins of UML (continued) • Consists of a family of graphical notations that help in describing and designing software systems • Focuses particularly on software systems built using the object- oriented style • Controlled by the Object Management Group, which is an open consortium of companies • Comes from the unification of many OO graphical modeling languages that thrived in the 1980s and early 1990s
  • 7. 7 As a Sketch • Most common use of UML • Used to help communicate some aspect of a system and to better understand it • Used for both forward engineering (i.e., build diagrams before coding) and reverse engineering (i.e., build diagrams from existing code) • Strives to be informal and dynamic • Only emphasizes those classes, attributes, operations, and relationships that are of interest • More concerned with selective communication than complete specification
  • 8. 8 As a Blueprint • Goal is completeness • Is more definitive, while the sketch approach is more explorative • Used to describe a detailed design for a programmer to follow in writing source code • Notation should be sufficiently complete so that a programmer can follow it in a straightforward manner • Can be used by a designer to develop blueprint-level models that show interfaces of subsystems or classes – Developers then work out the implementation details • As a reversed engineered product, diagrams convey detailed information about the source code that is easier for developers to understand
  • 9. 9 As a Programming Language • Specifies the complete system in UML so that code can be automatically generated • Looks at UML from a software perspective rather than a conceptual perspective which concentrates on the domain of study • Diagrams are compiled directly into executable code so that the UML becomes the source code • Challenge is making it more productive to use UML rather than some another programming language • Another concern is how to model behavioral logic – Done with interaction diagrams, state diagrams, and activity diagrams
  • 10. 10 Comparing and Contrasting Ways of Using UML • UML sketches are useful with both forward and reverse engineering and in both conceptual and software perspectives • Detailed forward engineering blueprints are difficult to do well and slow down the development effort – Actual implementation of interfaces will reveal the needs for changes • The value of reversed engineered blueprints depends on the CASE tool – A dynamic browser would be very helpful; a thick document wastes time and resources • UML as a programming language will probably never see significant usage – Graphical forms have not shown to be more productive in writing code than textual code for most programming tasks
  • 12. 12 Types of UML Diagrams Diagram Name Purpose Activity Models procedural and parallel behavior Class (*) Models classes, attributes, operations and relationships Communication Models interaction between objects Component Models structure and connection of components Composite Structure Models runtime decomposition of a class Deployment Models deployment of artifacts to nodes Interaction overview Mixes the sequence and activity diagram (more on next slide)
  • 13. 13 Types of UML Diagrams (continued) Diagram Name Purpose Object Models example configurations of instances Package Models compile-time hierarchical structure Sequence Models sequence interaction between objects State Machine (*) Models how events change an object over its life Timing Models timing interaction between objects Use Case (*) Models how users interact with a system (*) Denotes diagrams that we will use in this course
  • 14. 14 Classification of Diagram Types Diagram Behavior Diagram Structure Diagram Class Diagram Composite Structure Diagram Object Diagram Activity Diagram Use Case Diagram State Machine Diagram Interaction Diagram Component Diagram Deployment Diagram Package Diagram Sequence Diagram Communication Diagram Interaction Overview Diagram Timing Diagram
  • 15. 2. Use Case Diagram
  • 16. 16 Use Case Diagram • Use cases serve as a technique for capturing the functional requirements of a system • Describes the typical interactions between the users of a system and the system itself, providing a narrative of how a system is used • A use case consists of a set of one or more scenarios tied together by a common user goal • A scenario is a sequence of steps describing an interaction between a user and a system; some scenarios describe successful interaction; others describe failure or errors • Users are referred to as actors; an actor is a role that carries out a use case • An actor need not always be a person; it can also be an external system that is either automated or manual
  • 17. 17 Use Case Diagram (continued) • A use case diagram is like a graphical table of contents of the use cases for a system – It shows the use cases, the actors, and the relationships between them • Use cases represent an external view of the system; consequently, they have no correlation to the classes in the system – They can serve as a starting point for writing software validation test cases
  • 18. 18 Example Use Case Diagram Make automated menu selections Order food and drink Pay for food and drink Notify customer that food and drink are ready Customer Cook Payment System Expert Menu System
  • 20. 20 Activity Diagram • Serves as a technique to describe procedural logic, business process logic, and work flow • Is similar to a flowchart except that it can also show parallel behavior • States the essential sequencing rules to follow, thereby allowing concurrent algorithms to be used – Consequently, an activity diagram allows whoever is doing the process to choose the order in which to do certain things • Can be used to describe the actions in a use case
  • 21. 21 Example Activity Diagram Set counter = positive n Set accumulator = initial value n > 1 Set accumulator = accumulator * n Set n = n - 1 (n mod 5) == 0 Display accumulator value Return accumulator value T F T F
  • 23. 23 Class Diagram • Describes the types of objects in the system and the various kinds of static relationships that exist among them • Also shows the properties and operations of a class and the constraints that apply to the way objects are connected • A class box has three parts: – Name of the class – Attributes of the class – Operations of the class • Properties represent structural features of a class and consist of attributes and associations Name Attributes Operations
  • 24. 24 Attribute • Example + criticalMsg: String [1] = "Error message" {readonly} • Syntax – Visibility marker: public (+) or private (-) – Name: name of the attribute in the programming language – Type: Type of the attribute in the programming language – Multiplicity: how many objects fill the property – Default: Default value of the attribute at instantiation – {property-string}: additional properties of the attribute • Describes a property as a line of text within the class box • Used for representing value types visibility name: type multiplicity = default {property-string}
  • 25. 25 Association • Represented by a solid line between two classes directed from the source class to the target class • Used for representing (i.e., pointing to) object types • The name of the association goes at the target end of the association together • The target end of the association links to the class that is the type of the property • Multiplicities can be shown at both ends but are usually at the target end • Arrows may be bidirectional 1..nSource Target Name
  • 26. 26 Aggregation and Composition • Aggregation and composition are sometimes viewed as special types of associations and have their own UML symbol of a diamond at the source end of a line • Aggregation is a part-of relationship • Composition is more restrictive than aggregation – The diamond is filled in (i.e. shaded) – The part pointed to does not continue to exist without the whole 1..nSource Target Name
  • 27. 27 Operation • Example: + computeTotal (account: Account) : float • Syntax – Visibility marker: public (+) or private (-) – Name: name of the operation in the programming language – Parameter-list: list of parameters passed to the operation • Syntax: direction name : type = default-value • Direction is (in), (out), or (inout); default is (in) – Return-type: Type of the return value if there is one – {property-string}: additional properties of the operation • Portrays actions that a class knows to carry out • Corresponds to the methods of a class • Operations may be queries or modifiers; modifiers change the state of any object • Set and get operations are implied and therefore not shown visibility name (parameter-list) : return-type {property-string}
  • 28. 28 Generalization • Portrays inheritance between a super class and a subclass • Is represented by a line with a triangle at the target end as shown below Super class Subclass Subclass
  • 29. 29 Dependency • A dependency exists between two elements if changes to the definition of one element (i.e., the source or supplier) may cause changes to the other element (i.e., the client) • Examples – One class sends a message to another class – One class mentions another as a parameter to an operation • Once a dependency is created, if a class changes its interface, any message sent to that class may no longer be valid • A general rule is to minimize dependencies and be wary of cycles Class Class
  • 30. 30 Example Class Diagram 1..n Production Manager Auditor Record Keeper Report Generator Transaction Processor Account Accounts Payable Accounts Receivable Input Verifier Error Log Input Handler Local File Handler Remote File Handler Account List Accountant
  • 31. 31 When to Use Class Diagrams • Class diagrams are the backbone of UML and are the most used diagrams • Normally use only a subset of the notations available: class box, attributes, operations, association, aggregation, and generalization • Class diagrams only model software structure; consequently, it is easy to get too focused on class diagrams and ignore behavior – Use a state diagram to model the behavior of a class – Use a sequence diagram to model interactions (i.e., behavior) among objects of various classes
  • 32. 5. State Machine Diagram
  • 33. 33 State Machine Diagram • Commonly called a state diagram • A state diagram describes the behavior of a system • In object-oriented technology, a state diagram shows the lifetime behavior of a single object • A state diagram captures the behavior of a state across several use cases • A state diagram consists of states and transitions – Note that a state diagram is NOT a set of processes connected by lines representing data input and output • A state is characterized by the current values of an object's attributes and its name reflects some ongoing activity or state • A transition indicates a movement from one state to another because an event has occurred; this transition changes one or more attribute values of the class
  • 34. 34 Transition • Syntax – Trigger-signature: a single event that triggers a potential change of state – Guard: a Boolean condition that must be true for the transition to be taken – Activity: some behavior that is executed during the transition • All three parts of the transition label are optional – A missing guard means the transition is taken every time the event occurs – A missing activity indicates that nothing extra is done during the transition – A missing trigger-signature is rare; this means the transition is immediately taken and usually occurs in activity states • When an event occurs in a state, each corresponding transition out of the state must be unique • Multiple transitions with the same event must have guards on them that are mutually exclusive; otherwise its non-deterministic • If an event occurs for which there is no transition labeled, then the event is ignored in that state trigger-signature [guard]/activity
  • 35. 35 Activity State • In some states, an object is inactive as it waits for the next event before it does something • In an activity state, the object is doing some ongoing work – The work may take a finite amount of time – A transition from the state cannot occur until the work is done – This is represented by "do/ activity" notation in the state box
  • 36. 36 Example State Diagram Empty Stack Partially Filled Stack Full Stack push pop [n == 1] push [n - 1 == max] push [n – 2 < max] pop [n > 1] pop [n == max] pop / return error push [n >= max] / set n to max; return error
  • 37. 37 Three Ways to Implement a State Diagram in Source Code • A double-nested switch statement – Each case label in a switch has its own internal switch statement – The case labels of the external switch are various states – The case labels of each internal switch are events – Guards are implemented as Boolean conditions • A state table with columns for source state, target state, event, guard, and activity • The state pattern, which creates a hierarchy of state classes to handle behavior of the states
  • 38. 6. Other Diagrams of Interest
  • 39. 39 Sequence Diagram • Captures the behavior of a single scenario in a use case • Shows a number of example objects and messages that are passed between those objects within the use case • The columns of the diagram represent each object involved in the use case • The life time of an object progresses from the top of the diagram to the bottom • Clearly illustrates the calls between participants and the sequence of those calls • Gives a good picture about which participants are doing which processing
  • 40. 40 Sequence Diagram (continued) • Can exhibit centralized control or distributed control – In centralized control, one participant does all of the processing – In distributed control, processing is split among many participants – Distributed control gives more opportunities for using polymorphism rather than using conditional logic • Use a sequence diagram when you want to look at the behavior of several objects within a single use case • When not to use a sequence diagram – If you want to look at the behavior of a single object across many use cases, use a state diagram – If you want to look at the behavior of several objects across many scenarios, use an activity diagram
  • 41. 41 Object Diagram • Represents a snapshot of the objects in a system at a point in time • Shows instances rather than classes, therefore it is sometimes called an instance diagram • When to use object diagrams – To show examples of objects connected together based on a specific multiplicity number – To show instances with values for their attributes
  • 42. 42 Package Diagram • Used to take any construct in UML and group its elements together into higher-level units • Used most often to group classes • Corresponds to the package concept in Java • Represented by a tabbed folder, where the tab contains the package name • Can show dependencies between packages – The more dependencies coming into a package, the more stable its interface needs to be
  • 43. 43 Deployment Diagram • Shows a system's physical layout, revealing which pieces of software run on which computer platforms • Uses rectangles to represent nodes and lines to represent communication paths between nodes – Nodes contain artifacts, which are the physical manifestations of software (i.e., executable and data files) – Listing an artifact in a node shows that the artifact is deployed to that node in the running system – Artifacts can be shown either as class boxes or by just listing the name in the node – Communication paths can be labeled based on the protocols that they use • Can be used as a configuration management tool to show an "as is" system architecture and a proposed "to be" system architecture for an organization
  • 44. 7. UML in the Software Process
  • 45. 45 Fitting UML into Software Requirements Analysis • A use case diagram helps describe how people interact with the system • An activity diagram shows the context for use cases and also the details of how a complicated use case works • A class diagram drawn from the conceptual perspective is a good way of building up a rigorous vocabulary of the domain – It also shows the attributes and operations of interest in domain classes and the relationships among the classes • A state diagram shows the various states of a domain class and events that change that state
  • 46. 46 Fitting UML into Software Design • A class diagram drawn from the software perspective can show design classes, their attributes and operations, and their relationships with the domain classes • A sequence diagram helps to combine use cases in order to see what happens in the software • A package diagram shows the large-scale organization of the software • A state diagram shows the various states of a design object and events that change that state • A deployment diagram shows the physical layout of the software
  • 47. 47 Fitting UML into Software Documentation • Complements the written documentation and in some instances can replace it • Captures the outcome of the requirements analysis and design activities in a graphical format • Supplies a software maintainer with an overall understanding of a system • Provides a good logical roadmap of the system layout • Describes the various states in which a system may exist • Details complex algorithms in a more understandable form • Shows how multiple objects collaborate in the system 