workflow - generate java code from a flowchart -
the following flowchart: 
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
Post a Comment