title: Is this a valid use of DIP (SOLID)?
body: <p>I would like to ask if that implementation of classes <code>Genotypes</code> and <code>Individual</code> violates the Dependency Inversion Principle? If so, how to fix that?</p>
  
  <p><img src="https://i.stack.imgur.com/thstB.jpg" alt="classes-abstraction hierarchy"></p>
  
  <p>Here is the code:</p>
  
  <pre><code>public interface IGenotype
  {
     //some code...
  }
  
  public abstract class AIndividual
  {
      // ... some code
      public IGenotype Genotype { get; set;}   // DIP likes that !
  }
  
  public class Individual : AIndividual
  {
      public Individual()
      {
          // some code ...
          this.Genotype = new Genotype();   // Is this ok in case of DIP? 
      }
  }
  
  public class Genotype : IGenotype
  {
      // ... some code
  }
  </code></pre>