Object Oriented Modeling and Design 15CS55 Multiplicity Multiplicity specifies the number of instances of one class that may relate to a single instance of an associated class. Multiplicity constrains the number of related objects. UML conventions: UML diagrams explicitly lists multiplicity at the ends of association lines. UML specifies multiplicity with an interval, such as (exactly one). “1” or more). “1..”(one to five, inclusive). “3..5”(three * ( many, i.e zero or more). “ ” notations 1 exactly one many 0..* (zero or more) Class optional 0..1 (zero or one) Class numerically m..n Specified Class (m to n, inclucive) Example: 0..* Course CourseOffering Dept. of CSE, ACE Page 17
Object Oriented Modeling and Design 15CS55 Multiplicity Multiplicity specifies the number of instances of one class that may relate to a single instance of an associated class. Multiplicity constrains the number of related objects. UML conventions: UML diagrams explicitly lists multiplicity at the ends of association lines. UML specifies multiplicity with an interval, such as “1” (exactly one). “1..”(one or more). “3..5”(three to five, inclusive). “ * ” ( many, i.e zero or more). notations 1 exactly one many 0..* Class (zero or more) 0..1 optional Class (zero or one) m..n numerically Specified Class Example: (m to n, inclucive) Course 0..* CourseOffering Dept. of CSE, ACE Page 17