Some Dependencies between Classes
Use
- A uses B: the most informal and general relation. A might, for example, call a method from class B, or have a method with argument type B or return type B.
Containment
- A has a B: an important special case of use—class A has a field of type B.
Inheritance
- B is an A: class B has all the properties of class A. The compiler treats B as a special case of A, and allows an instance of B to be used in any place where an instance of A could appear. In general the class B will extend A with some extra properties of its own.