java - How to show instance of class within a class in UML? -


if want show, example, class match contains instance of class game , class set, have them in attributes or have line classes representing when instance of match created creates instance of game , set?
here's mean in code:

public class match {     private set set = new set();     private game game = new game();  } 

both listing attributes , showing association (line pointing class) valid , have similar semantic.

showing graphically rather textually gives opportunity optionally present additional information: aggregation/composition, availability, ownership. yet if none of present or important, meaning precisely same , 1 can replaced depending on more useful you.


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -