Representing Different relationships between classes.Association, Composition UML

Different relationships between classes (like Association, Inheritance, Implementation, Dependency, Aggregation and Composition etc) can be represented using different arrows and symbols as follows.

Here, these relationships can be more clarified using below like class diagrams generated using ObjectAid in eclipse

A.java


package testOA;

public class A {

 public A() {
 bain = new B();
 }
 
 private void testA() {

 C c = new C();
 }
 
 final BaIn bain;
 
}

B.java

package testOA;

public class B extends Ba{

}

Ba.java

package testOA;

public class Ba implements BaIn{

}

BaIn.java

package testOA;

public interface BaIn {

}

C.java

package testOA;

public class Ba implements BaIn{

}

Class Diagram :
CLS-DGR

References :

Advertisements