Below is a mapping between program elements in C# and their corresponding UML diagram elements, along with the meaning of each.
UML Elements Table
| Program element | Diagram element | Meaning |
|---|---|---|
| Class | Type and parameters specified when important; access indicated by + (public), – (private), # (protected). | |
| Interface | Name starts with I. Also used for abstract classes. | |
| Note | Any descriptive text. | |
| Package | Grouping of classes and interfaces. | |
| Inheritance | B inherits from A. | |
| Realization | B implements A. | |
| Association | A and B call and access each other’s elements. | |
| Association (one way) | A can call and access B‘s elements, but not vice versa. | |
| Aggregation | A has a B, and B can outlive A. | |
| Composition | A has a B and B depends on A. |
📖 The content belongs to the book C# 3.0 Design Patterns – Judith Bishop