I am creating an android app for pharmacy duties for different cities.My approach:I created an Interface with method getDuties, and for every cities I create a class named with name of the cityexample:public class AthensProvider extends CityProviderInside 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);provider.getDuties();Is this approach correct?
Design for an Android app (pharmacy duties)
design patterns;android
Duties sounds like something that should be in a database or configuration file. Having custom code in your app for each city sound like a maintenance nightmare waiting to happen.