I am creating an android app for pharmacy duties for different cities.
I created an
Interface with method
getDuties, and for every cities I create a class named with name of the city
public class AthensProvider extends CityProvider
Inside this class, I have the logic for parsing and returning duty objects.
Finally, in when the user changes city preference I have something like this:
CityProvider provider = ProviderHelper.getProvider(city);
Is this approach correct?