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 Aggregation
  • Creating an Aggregation Relationship
  1. UML Designer
  2. Class Diagrams

Aggregation

PreviousCompositionNextEnumeration

Last updated 7 months ago

Aggregation is a special form of association in UML that represents a whole-part relationship between Classes, where the part can exist independently of the whole. In Modeldraw, you can use Aggregation relationships to model these looser "has-a" connections in your system design, showing how objects are composed of or contain other objects without implying ownership.

Understanding Aggregation

Aggregation represents a weak "has-a" or "consists of" relationship between classes. Key characteristics include:

  • The part (contained object) can exist independently of the whole (container object)

  • If the whole is destroyed, its parts are not necessarily destroyed

  • A part can belong to multiple wholes simultaneously

  • The whole references its parts, but doesn't manage their lifecycle

Aggregation is represented in UML by a solid line with an unfilled (hollow) diamond at the end of the whole (container) class.

Examples of aggregation:

  • A Library (whole) and Books (parts)

  • A Department (whole) and Employees (parts)

  • A Playlist (whole) and Songs (parts)

Aggregation differs from Composition, which is a stronger form of association where the part cannot exist independently of the whole. It's also different from a simple Association, as it implies a more specific whole-part relationship.

Creating an Aggregation Relationship

To create an Aggregation relationship in Modeldraw:

  1. Select the Aggregation tool from the toolbox

  2. Click on the part (contained) Class

  3. Move above and click the whole (container) Class

The hollow diamond will automatically appear at the end of the whole class, indicating the whole-part relationship.

An Aggregation