user437291
user437291

Reputation: 4651

Can someone explain this UML diagram

enter image description here

This is embarrassing, I apologize for not including the diagram image ( I thought I included it, but I should be more careful and verify it in the post )

I know almost nothing about UML, but to my knowledge an arrow with hollow head represents inheritance relationship ( ie ANDSpecification class inherits from CompositeSpecification class ), while the other type of arrow tells us we can navigate from ANDSpecification to CompositeSpecification?

a) But why does the diagram connecting ANDSpecification and CompositeSpecification contain both types of arrows? Perhaps because in addition to ANDSpecification inheriting from CompositeSpecification, it also has a property of type CompositeSpecification?

b) What is the meaning of numbers next to arrows?

Upvotes: 3

Views: 7748

Answers (1)

Muhammad Hani
Muhammad Hani

Reputation: 8664

First of all, could you please provide the source of your class diagram implementation, your inputs are not clear enough to determine the realtionships between the classes.

  • (A) There are two types of arrows, the arrow with a rectangular head describes "Generalization".

The specific classifier inherits part of its definition from the general classifier. The general classifier is at the arrow end of the connector. Attributes, associations, and operations are inherited by the specific classifier. Use the Inheritance tool to create a generalization between two classifiers.

  • The second type of arrows describes "Association"

A relationship between the members of two classifiers. There are two types of it, Aggregation and Composition.

  • (B) The numbers beside arrows simply describes "Multiplicity"

Multiplicity of an association end is the number of possible instances of the class associated with a single instance of the other end.

  ┬─────────────────────────┬───────────────────────────────────────────────────────┬
  │  Multiplicities         |      Explanation                                      |
  │                         |                                                       | 
  ├─────────────────────────┼───────────────────────────────────────────────────────┼
  |0..1                     | zero or one instance.                                 | 
  ├─────────────────────────┼───────────────────────────────────────────────────────┼
  |0..*  or  *              | no limit on the number of instances (including none)  | 
  ├─────────────────────────┼───────────────────────────────────────────────────────┼
  |1                        | exactly one instance                                  | 
  ├─────────────────────────┼───────────────────────────────────────────────────────┼
  |1..*                     | at least one instance                                 | 
  ├─────────────────────────┼───────────────────────────────────────────────────────┼

You can find helpful examples in the links below.

Explanation of the UML arrows

http://msdn.microsoft.com/en-us/library/dd409437%28VS.100%29.aspx

http://edutechwiki.unige.ch/en/UML_class_diagram

Upvotes: 8

Related Questions