#include <fstream.h>
#include <string.h>
#include <math.h>

//Header file for Figure class hierarchy

const Size = 9;

//Base class declaration

class Figure
{
 protected:
   char Name[Size];
   float Area;
   float Perimeter;

 public:
   Figure();
   virtual void Display();
   char *GetName();
   float GetArea();
   float GetPerim();
};

//Derived class Rectangle declaration

class Rectangle :public Figure
{
 protected:
   float Width;
   float Length;

 public:
   Rectangle();
   Rectangle(float LengthVal,  //input - rectangle length
	     float WidthVal);  //input - rectangle width
   void ComputePerim();
   void ComputeArea();
   void Display();
};

//Derived class Square declaration

class Square :public Rectangle
{
 public:
   Square();
   Square(float SideVal);  //input - square side length
   void Display();
};
