TOPIC 12.3.2b
Dividing Source Code for Classes


#include "circle.h" //" " are used instead of < > to find
                    //the file in the current directory

// default constructor
circle::circle()
{
  radius = 0.0;
}

// copy constructor
circle::circle(const circle & Object)
{
  radius = Object.radius;
}

// Method to set the radius of the circle
void circle::SetRadius(float IncomingRadius)
{
  radius = IncomingRadius;
}

// Method to find the area of the circle
double circle::Area()
{
 return(PI*radius*radius);
}