Modeldraw
  • Welcome to Modeldraw
  • Getting Started
    • Quickstart Guide
  • FAQ
  • UML Designer
    • Common Elements
      • Comment
      • Comment Link
      • Dependency
      • Realization
      • Frame
    • Class Diagrams
      • Class
      • Association
      • Generalization
      • Composition
      • Aggregation
      • Enumeration
      • Interface
      • Association Class Link
      • Ball (Interface Realization)
      • Socket (Required Interface)
    • Sequence Diagrams
      • Lifeline
      • Activation Bar
      • Synchronous Message
      • Asynchronous Message
      • Return Message
      • Found Message
      • Interaction Frame
    • Use Case Diagrams
      • Actor
      • Use Case
      • Association
      • System Boundary
      • Generalization
      • Include Relationship
      • Extend Relationship
    • State Machine Diagrams
      • State
      • Initial State
      • Final State
      • Transition
      • Superstate
      • Concurrent Boundary
      • History Pseudostate
      • History Transition
    • Package Diagrams
      • Package
    • Deployment Diagrams
      • Node
      • Communication Path
      • Deployed Artifact
      • Internet
    • Activity Diagrams
      • Initial Node
      • Activity Final
      • Action
      • Flow
      • Decision / Merge
      • Fork / Join
      • Partitions
      • Flow Final
      • Send Signal
      • Accept Signal
      • Time Signal
    • Component Diagrams
      • Component
      • Ball (Interface Realization)
      • Socket (Required Interface)
    • Communication Diagrams
      • Object
      • Link
  • Wireframes
    • Views
    • Layouts
    • Components
Powered by GitBook
On this page
  • Understanding Associations
  • Creating an Association
  • Creating a self-link
  • Setting navigability
  1. UML Designer
  2. Class Diagrams

Association

PreviousClassNextGeneralization

Last updated 7 months ago

An Association in a Class Diagram represents a relationship between two classes. It indicates that objects of one class are connected to objects of another class, or that one class uses services of another class.

With Associations in Modedraw's Class Diagram, you can:

  • Show relationships between classes in your system

  • Indicate how classes interact or depend on each other

  • Specify the multiplicity of relationships between classes

  • Represent bi-directional or unidirectional relationships

  • Add role names to clarify the nature of the association

  • Model various types of relationships such as "has-a" or "uses"

Understanding Associations

An Association in Modedraw's Class Diagram tool is typically represented by a solid line connecting two classes. Key points to understand about Associations include:

  • Multiplicity: You can specify how many objects of each class participate in the relationship.

  • Direction: Associations can be bi-directional (default) or unidirectional.

  • Role names: You can add names to each end of the association to clarify the role of each class in the relationship.

  • Attributes: Associations can have their own attributes if the relationship itself needs to store data.

Creating an Association

To create an Association in Modedraw's Class Diagram:

  1. Select the Association tool from the toolbox.

  2. Click on the first class you want to connect.

  3. Move your mouse to the second class you want to connect.

  4. Click on the second class. An Association line will appear connecting the two classes.

Creating a self-link

To create an Association in Modedraw's Class Diagram:

  1. Select the Association tool from the toolbox.

  2. Click on a class you want to create the self-link for.

  3. Click again on the same class. A self-link will appear.

Setting navigability

Associations can be bi-directional or unidirectional. To adjust navigability, open the properties dialog and toggle the Navigable checkbox for both ends of the relationship.

An Association
A self-link
A bi-directional association
The same relationship as a uni-directional relationship