Search code examples
umldiagramdataflow

UML dataflow diagram strategies for an example structure


What would be the best strategies to describe the following:

1) class A created instances of classes B and C 2) class B being able to communicate to class D through a pointer in class B to a specific member in class D

Thanks in advance for the suggestions, as I don't know the proper term to describe them in order to search for more information on the internet.


Solution

  • There's a type of diagram called a "data flow diagram", but that's not one of the UML diagrams.

    Showing that A creates instances of B and C can be shown in a UML 'sequence diagram', which shows the sequence in time at which things happen (e.g. an instance of A exists at time T0, at time T1 it creates an instance of B, and at time T2 it creates an instance of C).

    Showing that B has a member which points to D can be shown in a UML 'class diagram', which illustrates the members (methods and instance data) of a class or classes.

    However I don't think UML has a notation for "pointer to member" ... and I'm not sure what you mean when you say that "B communicates to class D through a pointer to a specific member in D": can you please give an example (e.g. in source code) to illustrate that?