Class Diagrams
Six types of class diagrams
Six types of class diagrams

class_diagrams
Ranking by the strength of relation
Inheritance
Also called “Generalization”
In an inheritance relationship, the subclass inherits all functionalities of the parent class, which possesses all attributes, methods, and subclasses.
Implementation
In an implementation relationship, a class implements an interface, and the methods within the class implement all the methods declared by the interface.
Composition
The relationship between the whole and its parts, where the whole and parts cannot be separated
Aggregation
The relationship between the whole and its parts, where the whole and parts can be separated.
Association
Indicates that one class holds a reference to one or more instances of another class as its attribute.
Dependency
If changes in class A(Car) lead to changes in class B(Oil), then class B is said to depend on class A.