/**
  *@author CS Dept 239
  *@revisor Jeremy Halterman
  *@version 1.1
  *@date 9-17-08
  *A class called circle uses constructors and two getter methods
  *for returning radius and area*/


public class Circle
{
  //private to this class--holds radius value
  private double radius;
  
  //explicit constructor - accepts user input of a double
  public Circle  (double r)
  {
	//input is stored in class's instance variable
    this.radius = r;
  }//end Circle constructor
  
  /**@return Math.PI*radius*radius   returns the area
   * */
  public double getArea()
  { 
    return Math.PI * radius * radius;  
  }//end getArea
  
  /**@return radius   returns the radius of a circle*/
  public double getRadius()
  {
     return radius;
  }//end getRadius
  
  /**@return boolean equals  this holds a true or false value for equivalency
   * @param Circle c   this is passed as the value to compare to*/
  public boolean equalsCircleCompare(Circle c)
  {
	 boolean equals = false;
	 
	 /*method in composed of the calling object this being compared with the passed
	 object c's value, since these are numerical values, I used a == operator,
	 instead of a compares or equals method*/
	 if((this.radius == c.radius) && 
	    this.getArea() ==(c.getArea()))
		 equals = true;
	 //returns true or false
	 return equals; 
  }//end equalsCircleCompare
  
  public boolean greaterThan(Circle c)
  {
	  boolean equals = false;
	  
	  if(c.getArea() > this.getArea())
		  equals = true;
	  else
		  equals = false;
	  return equals;
  }
  
  public String toString()
  {
	  String str;
	  str = "The radius is: " + radius 
			  + " and the area is: " + this.getArea();
	  return str;
  }
}//end class