Refactoring options - multiple methods in same class or into separate classes
<p>we have some API which will be called either by client A, B, C or D</p>

<p><strong>Current code</strong></p>

<pre><code>doSomething(String client){

if (client.equals("A")){
...
}
else if (client.equals("B")){
...
}
</code></pre>

<p><strong>Proposed refactoring 1</strong></p>

<p>separate into multiple methods and have each client call the dedicated method such as</p>

<pre><code>doSomethingForClientA()

doSomethingForClientB()
</code></pre>

<p>we need this because internally each method will call other private methods defined in the same class</p>

<p><strong>Proposed refactoring 2</strong></p>

<p>Use strategy (or template) pattern and separate into multiple classes for the clients to call</p>

<p>the method call from client remains </p>

<pre><code>doSomething()
</code></pre>

<p>Which approach is better in the long run? Is there any design pattern to help with option 1 ?
or a 3rd option?</p>
