and i am having 4 same conditions for each of the codes like A, B, C , D.
Ex 1 :: if we are getting the code 2003 and the condition is B
Ex 2 :: if we are getting the code 2001 and the condition is D
Ex 3 :: if we are getting the code 2004 and the condition is B
In these kind of scenario which kind of logic is help full to me.
which are going to switch cases like A,B,C,D and should i do like for each code with each switch case
like 2001 switch case for A,B,C,D
2002 switch case for A,B,C,D
2003 switch case for A,B,C,D
2004 switch case for A,B,C,D
So as you confirmed for all those code you need to follow same steps of processing but based on the condition. So you just need to create switch case for conditions alone.
You can use switch case activity . You can create 4 cases: case A, case B etc… whatever condition you are passing that particular case should execute