What does the UML diagram capture

What is a UML diagram?

To learn how to create different types of UML diagrams, check out any or all of the tutorials below. There you will learn how to draw structure and behavior diagrams.

Structural diagram - tutorial and examples

CLASS DIAGRAMS

Class diagrams represent the static structures of a system, including its classes, attributes, processes and objects. A class diagram can represent computational data or organizational data in the form of implementation or logical classes. There may be some overlap between these two groups.

  1. Classes are represented by a rectangular shape made up of three parts. The upper section shows the name of the class and the middle section shows the attributes of the class. The lower section contains the operations of the class (also known as methods).
  2. Add class shapes to your class diagram to show the relationship between these objects. You may need to add subclasses as well.
  3. Use lines to indicate association, inheritance, multiplicity, or other relationship between classes and subclasses. Your preferred notation style forms the basis for notating these lines.

COMPONENT DIAGRAMS

Component diagrams show how components are connected together to form larger component or software systems. These diagrams are used to show the dependencies of each component in the system. A component is required so that a stereotype function can be performed. A component stereotype can consist of executable programs, documents, database tables, files, or library files.

  1. Represent a component using a rectangular shape. A component should have two small rectangles on its side (or use an icon with this shape).
  2. Add lines between component shapes to show the relevant relationships.

IMPLEMENTATION DIAGRAMS

An implementation diagram shows the physical implementation and structure of hardware components. Implementation diagrams show where and how components of a system operate together.

  1. Use the same notation for drawing implementation diagrams that you use for the component diagram.
  2. Use a 3D cube to represent a node (this represents a physical or virtual machine).
  3. Label the node in the same style as the sequence diagrams. If necessary, add further nodes, which you then connect with lines.

Behavioral Diagram Tutorial and Examples

Activity diagram

Activity diagrams show the flow-based control flow between class objects along with organizational processes such as business workflows. These diagrams use special shapes that are then connected with arrows. The notations for activity diagrams are similar to those for state diagrams.

  1. Start with a filled circle to draw your activity graph.
  2. Connect the circle to the first action, which is represented by a rectangle with rounded corners.
  3. Now connect each action with other actions. To do this, use lines that demonstrate, step by step, the flow of the whole process.
  4. You can also use areas of responsibility to represent the particular objects that perform each action.

Use case diagram

A use case is a sequence of steps that defines an interaction between an actor (a person interacting with the system or an external system) and the system itself. Use case diagrams use the specifications of a use case and model the functional components of a system. These diagrams help development teams understand the requirements of their system, including the role of human interaction in the system and the differences between different use cases. A use case diagram can represent all use cases of a system or just a group of use cases with similar functionality.

  1. To draw a use case diagram, first add an oval shape to the center of your worksheet.
  2. Enter the name of the use case in the oval shape.
  3. Represent actors with a stick figure next to the diagram, then use lines to model relationships between actors and use cases.

Sequence diagram

Sequence diagrams - also known as event diagrams or event scenarios - illustrate how processes interact with each other by showing the calls between different objects in a sequence. These charts have two dimensions: vertical and horizontal. The vertical lines show the sequence of messages and calls in chronological order, and the horizontal elements show the object instances to which the messages are routed.

  1. To create a sequence diagram, draw a rectangle in which you enter the name of the class instance and the class.
  2. Draw lines between class instances to represent the sender and recipient of messages.
  3. Use closed arrowheads for synchronous messages, open arrowheads for asynchronous messages, and dashed lines for reply messages.