Use Case Diagram

A use case diagram is a type of diagram used in system analysis and design to represent the interactions between users (or actors) and a system. It illustrates the different ways in which users can interact with the system and the different tasks or use cases that the system supports.

Major elements of business use case diagram - business actor, business use case,
business boundary, include and extend relationships. (UD)
Major elements of UML use case diagram - actor, use case, subject,
include and extend relationships.

Use case diagrams consist of the following components:

  • Actors: These are the entities (e.g. users, external systems, or devices) that interact with the system.
  • Use cases: These are the tasks or functions that the system supports. Each use case represents a specific goal or activity that a user can perform within the system.
  • Relationships: These show the associations between actors and use cases. The relationships can be one-to-one, one-to-many, or many-to-many.
  • System boundary: This is a box that contains all the use cases and actors that are part of the system.

Use case diagrams are useful for identifying the different user roles and their interactions with the system, as well as the specific tasks or use cases that the system supports. They can also help in identifying potential areas of improvement or new features that can be added to the system to better meet user needs. Use case diagrams can be used in conjunction with other diagrams, such as sequence diagrams and class diagrams, to provide a comprehensive view of the system.


Sequence Diagram

Sequence diagrams are a type of diagram used in system analysis and design to represent the interactions between objects or components in a system. They show the sequence of messages exchanged between objects and the order in which they occur.

Major elements of UML sequence diagram

Sequence diagrams consist of the following components:

  • Actors: These are the entities (e.g. users, external systems, or devices) that interact with the system and trigger the sequence of events.
  • Objects: These are the components or subsystems of the system that exchange messages with each other.
  • Lifelines: These represent the duration of an object's existence in the sequence diagram and are shown as a vertical line.
  • Messages: These are the interactions between objects, and are shown as horizontal arrows between the lifelines of the objects. Messages can be synchronous, asynchronous, or self-referential.
  • Activation bar: This is a shaded area on the lifeline that shows the duration of time in which an object is actively executing a task.

Sequence diagrams are useful for understanding the flow of interactions between objects in a system and for identifying potential issues or bottlenecks. They are particularly useful for designing and documenting the behavior of complex systems, as they provide a visual representation of the system's behavior that can be easily understood by stakeholders. Sequence diagrams can be used in conjunction with other diagrams, such as use case diagrams and class diagrams, to provide a comprehensive view of the system.

Class Diagram

A UML class diagram is a type of diagram used to represent the structure of object-oriented programming systems. In UML class diagrams, there are several types of relationships that can exist between classes, including:

Domain diagram overview - classes, interfaces, associations, usage, realization, multiplicity. (CD)

  • Association: This relationship represents a link between two classes that describes how instances of the classes are related. Associations can be one-to-one, one-to-many, or many-to-many.
  • Aggregation: This relationship is a special type of association that represents a "has-a" relationship between classes. Aggregation implies that one class is a part of another class, but it can exist independently of the other class.
  • Composition: This relationship is a stronger form of aggregation where the "part" class is exclusively owned by the "whole" class. In other words, the "part" class cannot exist independently of the "whole" class.
  • Inheritance: This relationship represents an "is-a" relationship between classes, where one class (the subclass) inherits the attributes and methods of another class (the superclass). The subclass can add new attributes and methods or override the inherited ones.
  • Realization: This relationship is used to represent the implementation of an interface by a class. It indicates that the class is committed to implementing all the methods defined in the interface.

These relationships can be represented in UML class diagrams using various symbols and connectors. For example, an association is typically represented using a line connecting two classes, while inheritance is represented using an arrow pointing from the subclass to the superclass.