0% found this document useful (0 votes)
61 views14 pages

Diagrams in Uml

The document discusses UML diagrams, specifically focusing on interaction diagrams. It states that the UML includes nine diagrams to represent different views of a system, including class diagrams, sequence diagrams, collaboration diagrams, and others. It then provides more detailed descriptions of class diagrams, object diagrams, use case diagrams, and interaction diagrams. Finally, it discusses how to draw interaction diagrams and their purpose in visualizing the interactive behavior of a system.

Uploaded by

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

Diagrams in Uml

The document discusses UML diagrams, specifically focusing on interaction diagrams. It states that the UML includes nine diagrams to represent different views of a system, including class diagrams, sequence diagrams, collaboration diagrams, and others. It then provides more detailed descriptions of class diagrams, object diagrams, use case diagrams, and interaction diagrams. Finally, it discusses how to draw interaction diagrams and their purpose in visualizing the interactive behavior of a system.

Uploaded by

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

Diagrams in the UML

• Diagram is the graphical presentation of a set of elements,


most often rendered as a connected graph of vertices
(things) and arcs (relationships).
• In theory, a diagram may contain any combination of
things and relationships.
• For this reason, the UMl includes nine such diagrams.
•  Class diagram •  State chart diagram
•  Object diagram •  Activity diagram
•  Use case diagram •  Component diagram
•  Sequence diagram •  Deployment diagram
•  Collaboration diagram Interaction diagrams
Class Diagram: 
A class diagram shows a set of classes,
interfaces, and collaborations and their
relationships.
It is the backbone of all the object-oriented
software systems.
It displays the system's class, attributes, and
methods and operations.
It is helpful in recognizing the relation between
different objects as well as classes.
Association

Generalization
Object diagrams
Object diagrams also represent the static view of a system
but this static view is a snapshot of the system at a
particular moment.
An object diagram shows a set of objects and their
relationships
example
Object diagrams can be imagined as the snapshot of a
running system at a particular moment. Let us consider an
example of a running train
Now, if you take a snap of the running train then you will find
a static picture of it having the following −
•A particular state which is running.
•A particular number of passengers. which will change if the
snap is taken in a different time
The following diagram is an example of an object diagram. It represents the Order management
system which we have discussed in the chapter Class Diagram. The following diagram is an instance
of the system at a particular time of purchase. It has the following objects.
•Customer
•Order
•SpecialOrder
•NormalOrder
Now the customer object (C) is associated with three order objects (O1, O2, and O3). These order
objects are associated with special order and normal order objects (S1, S2, and N1). The customer
has the following three orders with different numbers (12, 32 and 40) for the particular time
considered.
The customer can increase the number of orders in future and in that scenario the object diagram
will reflect that. If order, special order, and normal order objects are observed then you will find
that they have some values.
For orders, the values are 12, 32, and 40 which implies that the objects have these values for a
particular moment (here the particular time when the purchase is made is considered as the
moment) when the instance is captured
The same is true for special order and normal order objects which have number of orders as 20, 30,
and 60. If a different time of purchase is considered, then these values will change accordingly.
Use case diagram
 A use case diagram shows a set of use cases and actors and
 their relationships
 Use case diagrams address the static use case view of a system.
 These diagrams are especially important in organizing and
modeling the behaviors of a system.
Interaction Diagrams
 Both sequence diagrams and collaboration diagrams are
kinds of interaction diagrams
 Interaction diagrams address the dynamic view of a
system
 A sequence diagram is an interaction diagram that
emphasizes the time-ordering of messages

 A collaboration diagram is an interaction diagram that


emphasizes the structural organization of the objects
that send and receive messages
How to Draw an Interaction Diagram?
We have two types of interaction diagrams in UML. One is the
sequence diagram and the other is the collaboration diagram. The
sequence diagram captures the time sequence of the message flow
from one object to another and the collaboration diagram describes
the organization of objects in a system taking part in the message
flow.
Following things are to be identified clearly before drawing the
interaction diagram
•Objects taking part in the interaction.
•Message flows among the objects.
•The sequence in which the messages are flowing.
•Object organization.
Purpose of Interaction Diagrams
The purpose of interaction diagrams is to visualize the interactive
behavior of the system. Visualizing the interaction is a difficult task.
Hence, the solution is to use different types of models to capture the
different aspects of the interaction.
Sequence and collaboration diagrams are used to capture the
dynamic nature but from a different angle.
The purpose of interaction diagram is −
•To capture the dynamic behaviour of a system.
•To describe the message flow in the system.
•To describe the structural organization of the objects.
•To describe the interaction among objects.
Where to Use Interaction Diagrams?
Interaction diagrams can be used −
•To model the flow of control by time sequence.
•To model the flow of control by structural organizations.
•For forward engineering.
•For reverse engineering.

You might also like