UML Class Diagram Relationships and Symbols

UML Class Diagram Relationships and Symbols

1. Inheritance  
Inheritance
B inherits from A.
2. Realization
Realization
B implements A.
3. Association
Association
A and B call and access each other’s elements.
4. Association (one way)
Association-One Way
A can call and access B’s elements, but not vice versa.
5. Aggregation
Association
A has a B, and B can outlive A.
6. Composition
A has a B, and B depends on A.

UML Questions : What is Class Diagram ?

What is Class Diagram ?

Class Diagram is static diagram which contains following : Classess, Attributes and Relationships. Class is represented by box containg three compartment which contain Class name, attributes ( ie.properties ) and behaviours ( i.e methods ). Access modifiers are represented in following way in Class diagram : “+” for public “#” for protected “?” for private