Is there any design pattern to avoid a nested switch case?
问题 I have seen similar kind of threads, But, not sure how to exactly apply the solutions to my case. My problem is that i have a set of usecases lets say 'A','B','C',There are certain commands i need to execute when the input passed(2 usecases are the input) is any 2 of the listed usecases. for example: switch(input1) { case A: break; case B: break; case C: break; } inside the each case, i will have to check on input 2, so, the final code could look like switch(input1) { case A: { switch(input2)