title: Implement same methods in different classes
body: <p>I really don't know how to word this problem, so I'll try to explain it with an example.</p>
  
  <p>Let's say I have three GUI classes:</p>
  
  <ol>
  <li>Base Surface class</li>
  <li>Detailed Surface Class</li>
  <li>Sprite Class</li>
  </ol>
  
  <p>All of them are independent of each other, no inheritance among them.
  Now I have a function "drag()" that makes a surface/sprite dragable, and I want to implement this function as a method for all three of them. </p>
  
  <p>Since it's the exact same code for all implementations I find it annoying, cumbersome and bad practice to rewrite the code.
  The only thing I came up with so far was to make a saperate class for it and inherit this class. But that also doesn't seem to be the way to go.</p>
  
  <p>I'd be very thankfull for some advice.</p>
  
  <p><em>EDIT</em></p>
  
  <p>Another example with a slightly different setup - I have the following classes:</p>
  
  <ol>
  <li>BaseSurface</li>
  <li>Dragable</li>
  <li>Resizable</li>
  <li>EventHandler</li>
  </ol>
  
  <p>Only the first one is independent, the others depend on the first (must be inherited).
  The end user should, without any effort, be able to choose between a simple BaseSurface, one with that implements dragable, one with resizable, one with eventHandler, and any combination. By "without any effort" I mean the end user should not have to make e custom Class and inherit the desired classes plus call the appropriate methods (<strong>init</strong>, update, ...) that some classes share.</p>
  
  <p>So what I could do is make a class for every possible combination, eg.
   "BaseSurfaceDrag", "BaseSurfaceDragResize", ...
  which will get messy really quickly. Whats a different and better approach to this?</p>