title: What is difference between the Open/Closed Principle and the Dependency Inversion Principle?
body: <p>The DIP states:</p>
  
  <blockquote>
    <ul>
    <li>High-level modules should not depend on low-level modules. Both    should depend on abstractions. </li>
    <li>Abstractions should not depend upon    details. Details should    depend upon abstractions.</li>
    </ul>
  </blockquote>
  
  <p>And the OCP states:</p>
  
  <blockquote>
    <p>Software entities (classes, modules, functions, etc.) should be open
    for extension, but closed for modification.</p>
  </blockquote>
  
  <p>I think if we satisfy the DIP, it will cover the OCP too, So, why we separate these two principles?</p>