The Rectangle class

The Rectangle class publicly derives from the Shape class. The Rectangle class will have two private, integer data members: length and width. The class must implement the following functions:

  1. Rectangle(int length=0, int width=0): A Rectangle class constructor.
  2. virtual int GetArea() const: An accessor that returns the area of the Rectangle.
  3. virtual void Draw() const: This function should output a string so that we can identify when the Rectangle's Draw function is called. E.g., "Drawing a rectangle ..."
  4. virtual ~Rectangle(): A virtual destructor