Unit 2 UML Diagrams Example
Unit 2 UML Diagrams Example
They can be divided into two main categories; structure diagrams and
behavioral diagrams. All 14 UML diagram types are listed below with
examples and a brief introduction to them explaining how they are used when
modeling applications.
1. Class Diagram
2. Component Diagram
3. Deployment Diagram
4. Object Diagram
5. Package Diagram
6. Profile Diagram
7. Composite Structure Diagram
8. Use Case Diagram
9. Activity Diagram
10. State Machine Diagram
11. Sequence Diagram
12. Communication Diagram
13. Interaction Overview Diagram
14. Timing Diagram
UML Diagram types
Class Diagram
Class diagrams are arguably the most used UML diagram type. It is the main
building block of any object oriented solution. It shows the classes in a
system, attributes and operations of each class and the relationship between
each class.
In most modeling tools, a class has three parts, name at the top, attributes in
the middle and operations or methods at the bottom. In large systems with
many related classes, classes are grouped together to create class diagrams.
Different relationships between classes are shown by different types of
arrows.
Below is an image of a class diagram. Follow the link below for more class
diagram examples or get started instantly with our class diagram templates.
Component Diagram
A component diagram displays the structural relationship of components of a
software system. These are mostly used when working with complex systems
that have many components. Components communicate with each other
using interfaces. The interfaces are linked using connectors. The images
below shows a component diagram.
Simple Component Diagram with Interfaces
Deployment Diagram
A deployment diagram shows the hardware of your system and the software
in those hardware. Deployment diagrams are useful when your software
solution is deployed across multiple machines with each having a unique
configuration. Below is an example deployment diagram.
UML Deployment Diagram ( Click on the image to use it as a template )
Object Diagram
Object Diagrams, sometimes referred to as Instance diagrams are very similar
to class diagrams. Like class diagrams, they also show the relationship
between objects but they use real world examples. They are used to show
how a system will look like at a given time. Because there is data available in
the objects, they are often used to explain complex relationships between
objects.
UML Object Diagram Example (Click on image to use as a template)
Package Diagram
As the name suggests, a package diagram shows the dependencies between
different packages in a system. Check out this wiki article to learn more
about the dependencies and elements found in package diagrams.
Package Diagram in UML
Profile Diagram
Profile diagram is a new diagram type introduced in UML 2. This is a diagram
type that is very rarely used in any specification. For more detailed technical
information about this diagram type check this link.
Basic UML Profile Diagram structure
Its a great starting point for any project discussion, because you can easily
identify the main actors involved and the main processes of the system. Click
through to read more about use case diagram elements and/or get started
instantly using our use case templates.
Use Case diagram showing Actors and main processes (click on image to use as template)
Activity Diagram
Activity diagrams represent workflows in a graphical way. They can be used to
describe business workflow or the operational workflow of any component in a
system. Sometimes activity diagrams are used as an alternative to State
machine diagrams. Check out this wiki article to learn about symbols and
usage of activity diagrams.
Activity Diagrams with start, end, processes and decision points (click on image to use as a template)
Sequence Diagram
Sequence diagrams in UML show how objects interact with each other and
the order those interactions occur. Its important to note that they show the
interactions for a particular scenario. The processes are represented vertically
and interactions are show as arrows. This article explains the purpose and
the basics of Sequence diagrams. Also check out this complete Sequence
Diagram Tutorial to learn more about sequence diagrams.
You can also instantly start drawing using our sequence diagram templates.
Sequence Diagrams in UML shows the interaction between two processes (click on image to modify
online)
Communication Diagram
Communication diagram was called collaboration diagram in UML 1. It is
similar to sequence diagrams, but the focus is on messages passed between
objects. The same information can be represented using a sequence diagram
and different objects. Click here to understand the differences using an
example.
Communication Diagram in UML
Timing Diagram
Timing diagrams are very similar to sequence diagrams. They represent the
behavior of objects in a given time frame. If its only one object, the diagram is
straight forward, but if there are more than one object involved, they can be
used to show interactions of objects during that time frame as well. ( img
http://blog.tangcs.com/2008/01/10/uml-2-diagrams/ )
Timing Diagram in UML
Mentioned above are all the UML diagram types. The links given in each
section explain the diagrams in more detail and cover the usage, symbols etc.
UML offers many diagram types, and sometimes two diagrams can explain
the same thing using different notations.