0

Let's consider following:

class bambi {
  //...some code
}
class rambo {
  //...some code
}
class coco_jambo {
  //...some code
}
class A{
    int a;
    boolean b;
    String c;
    bambi e;

    rambo some_method(coco_jambo par){}

}

are only String c and bambi a considered to be aggregates of class A? In other words when I am making an UML-Diagramm represantation of Aggregation of A am I only going to draw bambi e and String c as "parts" of A? if so, why are primitive data types not considered as aggregates (parts) of class A?

What about when a method is returning an object type or taking one as a parameter, will rambo and coco_jambo also be considered as aggregates (parts) of A ?

Harry
  • 101
  • 5
  • I think you can ignore a, b and c from your UML diagram as those types are not representing entities in your domain – shan Oct 26 '19 at 05:27
  • rambo and coco_jambo are not considered as aggregates as well – shan Oct 26 '19 at 05:29
  • Possible duplicate of [Does a relation (aggregation, composition) replace an attribute?](https://stackoverflow.com/questions/6797448/does-a-relation-aggregation-composition-replace-an-attribute) – Curiosa Globunznik Oct 26 '19 at 08:08

0 Answers0