title: Design/Patterns - should I use interfaces or abstract classes?
body: <p>I have following problem:
  I am creating an aplication for creating UML diagrams. Right now just to simplify everything I assume only couple of available diagram elements:</p>
  
  <ol>
  <li>class</li>
  <li>interface</li>
  <li>generalization</li>
  <li>interface implementation</li>
  <li>association</li>
  <li>aggregation</li>
  </ol>
  
  <p>I decided to create one common abstract class for all of that elements:</p>
  
  <p>abstract DiagramElement which has 2 subclasses also abstract:   </p>
  
  <ol>
  <li>DiagramRelation   </li>
  <li>DiagramObject</li>
  </ol>
  
  <p>Nextly DiagramRelation has 4 subclasses:  </p>
  
  <ol>
  <li>Generalization</li>
  <li>InterfaceImplementation</li>
  <li>Assosication</li>
  <li>Aggregation</li>
  </ol>
  
  <p>And DiagramObject has 2 subclasses:</p>
  
  <ol>
  <li>Interface</li>
  <li>Class</li>
  </ol>
  
  <p>I really wanted to post a picture so it would be all much more simplier but I don't have enough reputation points so sorry.  </p>
  
  <p>I came across following problem: each of this element have a different visual representation, ie: interface has only methods etc so each of this element will need to be show differently - I don't want to use multiple "if" instructions for it.</p>
  
  <p>I use WPF and I decided that every control will place it's contest into StackPanel which will be placed inside MyContextControl (inherits after ContextControl and add interface atribute):</p>
  
  <pre><code>public interface IDiagramElementDraw
  {
      public StackPanel Draw();
  }
  
  public MyContextControl : ContextControl
  {
      private IDiagramElementDraw _drawingInterface;
      private StackPanel context;
      public DrawControl()
      {
          context = _drawingInterface.Draw();
      }
  } 
  </code></pre>
  
  <p>But I don't know which class should implement IDiagramElementDraw interface - I don't want to implement it at the level of Interface, Class, Generalization etc classes because I want them to only represent logical information about each element.</p>
  
  <p>I would appreciate any help, feel free to post complete different solution - this one may be completely wrong, this was just my idea.</p>