In the case where a couple of classes implements an interface, and those classes have a couple of constants in common (but no functions), were should I put this constant ?
I've had this problem a couple of times.
I have this interface : DataFromSensors that I use to hide the implementations of several sub classes like DataFromHeartRateMonitor DataFromGps etc...
For some reason, those classes uses the same constants. And there's nowere else in the code were it is used.
My question is, were should I put those constants ?
Not in the interface, because it has nothing to do with my API
Not in a static Constants class, because I'm trying to avoid those
Not in a common abstract class, that would stand between the interface and the subclasses, because I have no functions in common, only a couple of constants (TIMEOUT_DURATION, UUID, those kind of things)