Derived classes not using all pure virtual methods from the base class : <p>I have a similar situation:</p>

<pre><code>class Question{
virtual double getPoints(double userAnswer) const = 0;
virtual double getPoints(const std::string &amp; userAnswer) const = 0;
.
.
};

class QText : public Question{
double getPoints(const std::string &amp; userAnswer) const;
.
.
};

class QNumeric : public Question{
double getPoints(double userAnswer) const;
.
.
};
</code></pre>

<p>And I need to be able to do something like this this:</p>

<pre><code>std::vector&lt;Question*&gt; quiz;
quiz.push_back(new QText(..));
quiz.push_back(new QNumeric(..));
quiz[0]-&gt;getPoints(..);
quiz[1]-&gt;getPoints(..);
</code></pre>

<p>I understand that if I don't implement a pure virtual function in a derived class, the class will be abstact and I won't be able to create an instance of that class. Is there a way to do what I want or should I just rethink the whole design?</p>
