class A { protected: int x; int y; public: A(int _x, int _y) virtual int getX(); virtual int getS(); }; class B { protected: int x; int z; public: B(int _x, int _z) virtual int getX(); virtual int getS(); };