title: Good practice to design a ABC(Abstract Base Class) in C++
body: <p>In java, we can define different interfaces and then later we can implement multiple interface for a concrete class.</p>
  
  <pre><code>// Simulate Java Interface in C++
  /*
  interface IOne {
      void   MethodOne(int i);
      .... more functions
  }
  
  interface ITwo {
      double MethodTwo();
      ... more functions
  }
  
  class ABC implements IOne, ITwo {
      // implement MethodOne and MethodTwo
  }
  */
  </code></pre>
  
  <p>In C++, generally speaking, we should avoid the usage of multiple inheritance, although multi-inheritance does have its edge on some situations.</p>
  
  <pre><code>class ABC {
  public:
      virtual void   MethodOne(int /*i*/) = 0 {}
      virtual double MethodTwo() = 0 {}
  
      virtual ~ABC() = 0 {}
  
  protected:
      ABC() {} // ONLY ABC or subclass can access it
  };
  </code></pre>
  
  <p><strong>Question1</strong>> Based on the design of <code>ABC</code>, should I improve any other things in order to make it a decent ABC?</p>
  
  <p><strong>Question2</strong>> Is it true that a good <code>ABC</code> should not contain member variables and instead variables should be kept in the subclasses?</p>
  
  <p><strong>Question3</strong>> As I indicated in the comments, what if <code>ABC</code> has to contain too many pure functions? Is there a better way?</p>