Tarun Oohri wrote: Actually i have 3 classes, ExtractPDF_1,ExtractPDF_2,ExtractPDF_3, each of which extract data from the uploaded PDF...
If those are the actual names you are using, they are horrible. Names should help the reader get an idea of the intent but these names don't do that. Your names should include something that helps explain what differentiates the functionality of one extraction method from the other extraction methods. No offense but frankly, using only 1, 2, etc.to make a distinction is misguided at best and just sloppy, lazy programming at worst. Sorry if that sounds a bit harsh; I'm just sayin'.
I agree with Henry, you don't have to do this. I suggest you look at the
chain of responsibility pattern, this will be a better way of organizing your logic, IMO.