#include<iostream>
class Shape
{
public:
Shape(){}
virtual ~Shape(){}
};
class Rectangle : public Shape
{
public:
Rectangle(int length, int width):Shape(){}
~Rectangle(){}
protected:
int length, width;
};
class Square : public Rectangle
{
public:
Square(int length):Rectangle(length,length){}
virtual Square(const Square & other):Rectangle(other.length, other.length){}
~Square(){}
int getLength(){return length;}
protected:
int length;
int width;
};
int main()
{
Square Object(5);
std::cout << "The length is << " <<Object.getLength()<<std::endl;
}