18

Does anyone know how to draw a switch statement in a graphical design?

For example:

If statement is a diamond shape

Loops are a square with a circle inside....?


Also is there a technical name for this kind of graphical representation? I have searched the internet and Java graphical designs do not seem to come up at all.

informatik01
  • 16,038
  • 10
  • 74
  • 104
user3058983
  • 233
  • 1
  • 2
  • 9
  • Similar question: http://stackoverflow.com/questions/4526633/switch-statement-in-control-flow-graph – Nandkumar Tekale Feb 27 '14 at 11:28
  • @NandkumarTekale I have checked the link and its not similar at all to my question. Thanks anyway. – user3058983 Feb 27 '14 at 11:57
  • As an answer to the second question, such graphical representations are usually drawn using [_Unified Modelling Language_](https://en.wikipedia.org/wiki/Unified_Modeling_Language) (**UML**). – informatik01 Sep 05 '19 at 08:25

1 Answers1

29

Switch Statement Graphical Representation

Here's how a switch statement is represented. A simple Switch Flowchart search on the internet can give you this result.

Aman Agnihotri
  • 2,973
  • 1
  • 18
  • 22