What is association relationship in terms of coding?

71 views Asked by At

There are 6 relationship in UML diagrams. These are association, dependency, aggregation, composition, generalization, realization. I learned some of them from a blog site. But I want to learn the background of these relationship. I mean the reflection of these uml relationship to code. The blog site contains some java codes about these uml relationship. For example;

public class A {

    private B _b;

    public void setB(B b) { 
           _b = b; 
    }

The above code represents aggregation. Like this, could you give me an example of association relationship as java code? (The blog site doesn't contain association relationship)

0

There are 0 answers