/**
*This class creates a circle object
*that has an area and radius 
*
* @author Yanitsa Staleva
* @date: 09/17/08
* section 2 
* Lab 8
*/


public class Circle
{
  private double radius;
  
  //constructor
  /**
  * @param double r 
  */
  public Circle  (double r)
  {
    this.radius = r;
  }
  
  /**
  *This method uses the global radius
  *variable to calculate the area of the 
  *circle
  * @ return double
  */
  public double getArea()
  { 
    return Math.PI * radius * radius;  
  }
  
  /**
  *This method simply returns the 
  *radius of the cirlce
  *
  * @ return double radius
  **/
  public double getRadius()
  {
     return radius;
  }
  /**
  * This is the toStrin method for 
  * this class and it returns a string
  * containing the radius and the area 
  * of the circle properly labeled. 
  *
  * @return String
  **/
  public String toString()
  {
   return "The radius of the circle is: " + 
	getRadius() + 
	       "\nThe area of the circle is: " 
			 + getArea();
  }
  /**
  * This method compares two circle objects
  *
  * @param Circle
  * @return boolean 
  **/
  public boolean equals(Circle circle)
  {
   boolean same;
	
	if(this.getArea() == circle.getArea() &&
	this.getRadius()== circle.getRadius())
	same = true;
	
	else
	same = false;
	return same;
  }
  
  /**
  * This method will compare two 
  * circle objects and deside which is 
  * the greater one
  *
  * @param Circle circle
  * @return boolean
  **/
  
 public boolean greaterThan(Circle circle)
 {
  boolean greater;
  
  if(circle.getArea()< this.getArea())
  greater = true;
  else
  greater = false; 
  
  return greater;
 }
 }//Circle