Multiplicität (EN)

Concept

Specification of how many instances of one class can relate to instances of another class

Architecture

classDiagram   class Kunde {     +kundenId: int     +name: string     +email: string   }   class Bestellung {     +bestellId: int     +datum: date     +betrag: decimal   }   class Produkt {     +produktId: int     +name: string     +preis: decimal   }      Kunde "1" -- "0..*" Bestellung : hat   Bestellung "1" -- "*" Produkt : enthält 

In Context

  • Typically used together with associations, aggregations, and compositions in UML class diagrams
  • Related to: Association, Aggregation, Composition, Cardinality
  • Example usage: A customer can have 0 to many orders (0..*), each order must have exactly one customer (1)
Quelle: AI Generated