Question

I have gotten my feet wet in UML with some class, use case and sequence diagrams. Unfortunately, I have not run into a type of diagram that would accurately represent a stack data type. For example, I want to model a stack of the following stack (yes, a stack of stacks):

enter image description here

What kind of UML diagram can I use to model this? Or is this such a basic diagram that I would be better using some type of industrial drawing tool instead of full-blown UML?

Was it helpful?

Solution

  • If you want to show that instances of one your class contain instances of other your classes that contain instances of yet other classes, and show their functions it is the work for a class diagram.

  • If you want to show how one instances are connected or contained in other instances, it is the work of Object diagram.

  • If you want to show the thorough inner structure of one or few classes and theirs connections, it is the work of Composite Structure Diagram

  • If you want to show actions and states, you need state machine diagram

    If the main focus is on what components are contained in other components, it is for Component diagram

  • If you want to show the logic of the stack, it is for the Activity diagram. But Sequence can work, too.

    You should say precisely, what functions or abilities or qualities of your stacks and components you want to show.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top