Reference solution
One correct implementation. Alternative approaches that satisfy the constraints are equally valid — the reviewer judges behaviour, not style.
#include <iostream>
using namespace std;
class Base {
public:
virtual void show() const { cout << "Base\n"; }
};
class Derived : public Base {
public:
void show() const override { cout << "Derived\n"; }
};
int main() {
Derived d;
d.show();
return 0;
}