class A {
public: virtual void start() = 0;
};
class B : public A {
public: void start();
};
class Ba : public B {
};
Do we need to redefine start()
in Ba
or the parent's B::start()
would be enough?
Parent's start()
is enough.
You should though use the override keyword for B's reimplementation :
class B : public A {
public: void start() override;
};
It makes it clear that the method is an implementation of a virtual one and the compiler will enforce that it will always be the case, even with future changes on class A.