remove duplication
<p>I have a class contains 10 methods which are doing almost the same things apart from one key event. Two examples are given below: </p>

<pre><code>
Public String ATypeOperation(String pin, String amount){
    doSomething();
    doMoreStuff();
    requestBuilder.buildATypeRequest(pin, amount);
    doAfterStuff();
}
</code>

<code>
Public String BTypeOperation(String name, String sex, String age){
    doSomething();
    doMoreStuff();
    requestBuilder.buildBTypeRequest(name, sex, age);
    doAfterStuff();
}
</code>
</pre>

<p>As you can see from the above methods, they are similar apart from calling different methods provided by requestBuilder. The rest 8 are similar too. There is a lot duplicated code here. I feel there is a better way to implement this, but don’t know how. Any ideas and suggestions are appreciated. </p>

<p>Thanks,
Sarah</p>
