//  Author:  Nancy Harris
//  Modification:  09/27/04
//  Assignment - Class Methods

/** Circle:  contains methods to calculate common values related to 	circles base on the value of the radius.
 */
public class Circle
{
 	// This variable is available to all methods.  It holds the radius 
	// of the circle object.  
	private double radius;
  
	/** Circle
	    input:  size of the radius of the circle
		 output: none
		 The value in the size parameter is stored in the radius variable 
	 */     
	public Circle(double size)
	{
		radius = size;
	}
	
	/** calcArea
		 input:  none
		 output: the calculated area of this circle based on radius
		 calculates the area of a circle using the formula PI r^2
	 */
	public double calcArea()
	{
	 	double area;
		area = Math.PI * radius * radius;
		return area;   
	}
	
	/** calcCircumference
		 input:  none
		 output: the circumference of this circle based on 2 PI r
		 calculates and returns the circumference of the circle 
		 based on the formula 2 PI r
	 */
	public double calcCircumference()
	{
	
		double circumference;
		
		circumference = 2 * Math.PI * radius;
		
		return circumference;
	}
	
	/** changeRadius
		 input:  the amount to increase or decrease the radius
		 output: the new radius
		 This method will add the changeAmt to the radius attribute
		 and will return the new value of the radius.  The change will 
		 permanently change the radius.
	 */
	public double changeRadius(double changeAmt)
	{
		radius = radius + changeAmt;
		return radius;
	}
	/** getRadius
		 input:  none
		 output: the radius of the circle
		 describe behavior here.
	 */
	public double getRadius()
	{
	 	return radius;
	}
	
	/** printString
		 input:  none
		 output: a String with the label, Circle of radius: followed 
		 by the raidus value.
	 */
	public String toString()
	{
		String printString;
		printString = "Circle of radius: " + radius;
		return printString;
	}

} // end Circle

