title: Create a design pattern for objects in two categories, both covering all objects
body: <p>I would like to design a class diagram for the following problem:</p>
  
  <p>From one perspective in my domain, my elements ("ELEMENTs") are either <strong>input</strong> elements or <strong>output</strong> elements, but not both. </p>
  
  <p>From another perspective, they are either <strong>nodes</strong> or <strong>arrows</strong> (but not both). </p>
  
  <p>For example, the element <strong>e1</strong> can have only one of the following situations: </p>
  
  <p>1) be an input node </p>
  
  <p>2) be an output node </p>
  
  <p>3) be an input arrow </p>
  
  <p>4) be an output arrow.  </p>
  
  <p>I would like to encode this without using constraint (like OCL)</p>
  
  <p>So far, I've come up with the following design diagram (grey classes are abstract):
  <img src="https://i.stack.imgur.com/TgYY6.png" alt="enter image description here"></p>
  
  <p><strong>My Question:</strong>
  Is there a more efficient pattern that would fit this problem more accurately, without multi-inheritance?</p>