#include using namespace std; class Rectangle { public: Rectangle(); int GetSideCount(); protected: int length, height; private: int side_count; }; Rectangle::Rectangle() : side_count(4) {} int Rectangle::GetSideCount() { return this->side_count; } class Square : public Rectangle { public: Square(int); }; Square::Square(int s) { length = height = s; cout<<"A square has "<GetSideCount()<<" sides.\n"; //this->side_count = 2; } int main() { Square S(5); return 0; }