title: Is it bad programming practice to mix virtual and non-virtual functions in a base class?
body: <p>I have a base class Base that I declare several polymorphic subclasses of. Some of the base class's functions are pure virtual while others are used directly by the subclass. </p>
  
  <p>(This is all in C++)</p>
  
  <p>So for instance:</p>
  
  <pre><code>class Base
  {
  protected:
       float my_float;
  public:
  
      virtual void Function() = 0;
  
      void SetFloat(float value){ my_float = value}
  </code></pre>
  
  <p>}</p>
  
  <pre><code>class subclass : public Base
  {
  
    void Function(){ std::cout&lt;&lt;"Hello, world!"&lt;&lt;std::endl; }
  }
  
  class subclass2 : public Base
  {
  
    void Function(){ std::cout&lt;&lt;"Hello, mars!"&lt;&lt;std::endl; }
  }
  </code></pre>
  
  <p>So as you can see, the subclasses would rely on the base class for the function that sets "my_float", but would be polymorphic with regards to the other function.</p>
  
  <p>So I'm wondering if this is good practice. If you have an abstract base class, should you make it completely abstract or is it okay to do this sort of hybrid approach?</p>