UML Arrows

By | August 17, 2019
Share the joy
  •  
  •  
  •  
  •  
  •  
  •  

Aggregation

Books is a part of Library. Dismiss of Library, it won’t lead dismiss of books.

Aggregation Relationship

 

class Library {
    Book book;
}

Composition

Library has books. Dismiss of Library, then books will be dismissed as well.

Composition Relationship in Class Diagrams

class Library {
    Book book;

}

Generalization/Extends

BankAccount implements Fixed Account

Inheritance Relationship in UML Class diagrams

class BankAccount extends FixedAccount {
}

Realization/Inheritance

BankAccount extends Fixed Account

Realization Relationship in UML Class diagrams

class PrinterSetup implements Printer {
}

Reference:

Class Diagram relationship

difference between association vs composition vs aggregation