3
Answers

UML - aggregation and association practical difference

jozino

jozino

15y
7.3k
1
Hi, please is anybody here who can explain me the difference between aggregation and association in UML on some concrete C# example? I was looking on many websites for answer but everybody answers by theoretical examples like tree has a leaf and so on, but i still dont understand it, cos i dont know how it looks like in real code! for examle: public class SomeClass { private int someInt; private AnotherClass anotherClass; } What kind of relationship is between someClass and anotherClass? can you provide me code examples for all types of class relationship: association, aggregation, composition, generalization? MANY THANKS
Answers (3)