I am using a single switch cases which will have more than 100 cases statement to be used. Are there any limit ?
The usage of cases are for the suggestions of my Aut
Or you can have a look at the strategy pattern. For example:
If it looks like this now:
switch (calculation type)
{
case: Fibonacci { ... }
case: Pithagoras { ... }
...
case 104 : { ... }
}
You can refactor it using the strategy pattern maybe like this:
CalculationStrategy strategy = strategyFactor.getStrategy(calculation type);
strategy.doCalculation;
Happy coding! Dave