Declared an interface for types of encoders and declared the Rotary encoder class