//********************************************************************

 

//       FiIe: figure. h

 

//       Abstract class figure contains operators and attributes common

 

//       to all figures.

 

//********************************************************************

 

#ifndef FIGURE_H

 

#define FIGURE_H

 

 

 

class figure

 

{

 

     // Member functions (common to all figures)

 

     public:

 

     // Read figure attributes

 

     virtual void readFigure ( ) = 0 ;

 

 

 

     // Compute the area

 

     virtual void computeArea ( ) = 0 ;

 

 

 

     // Compute the perimeter

 

     virtual void computePerim( ) = 0;

 

 

 

     virtual void displayFig( );

 

     // Display information about the figure

 

 

 

    // Attributes common to all figures

 

    protected:

 

            float area;          // The area of the figure

 

            float perimeter;  // The perimeter of the figure

 

};

 

#endif