workflow - generate java code from a flowchart -


the following flowchart: enter image description here

may described following java code:

if (a == 1 && b ==1){    actiona();  }   if (b == 3 || (b == 1 && == 2)){     actionb();     actionc(); }  if (b == 2){     actionc(); } 

is there better way translate flowchart in java code? looking sort of general pattern this. question arises fact adding single condition flowchart results in significant changes code.

you encapsulate actionb , actionc, while actionc being called after actionb in actionbc , make new method each cell in flow chart. in general should like: void b1(){ if(b==1) a1(); if (b==2) actionc(); ... }

void a1(){ if(a1==2) actionbc(); }

private void actionbc(){...}

and on... in way, expanding flowchart won't explode code.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -