What\'s better practice when defining several methods that return the same shape of data with different filters? Explicit method names or overloaded methods?
For exa
I have seen overloading overused when you have only subtle differences in the arguments to the method. For example:
public List GetProduct(int productId) { // return a List }
public List GetProduct(int productId, int ownerId ) { // return a List }
public List GetProduct(int productId, int vendorId, boolean printInvoice) { // return a List }
In my small example, it quickly becomes unclear if the second int argument should be the owner or customer id.