Relationships between two classes – Class Coupling in OOP
Class Relationships
- Class A inherits from Class B.
- Class A has an attribute of class B.
- Class A has a template attribute with a parameter of class B.
- Class A has a method with an argument of class B.
- Class A knows of a global variable of class B.
- Class A knows of a method containing a local variable of class B
- Class A is friend of Class B (in C++)

UML specifies the following six relationships between two classes:
- Association
- Aggregation
- Composition
- Inheritance
- Dependency
- Realization
