#include class Base { public: Base(int dist); virtual ~Base() = default; int get_distance(); virtual std::string get_color() = 0; // int increase_strength(); // Specific and only relevant for A // int increase_volume(); // Specific and only relevant for B protected: int distance; // In both A and B // std::string color; // Not here, only in A // double strength; // Not here, only in A // double volume; // Not here, only in B };