You are on page 1of 3

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

// Circle.java
//
//
//*******************************************************
public class Circle {

__________________________ // declare the private double instance


radius
__________________________ // declare the private double instance
x
__________________________ // declare the private double instance
y
//----------------------------------------------
// Class Constructor: set the initial values of
// the instance variables
// for this circle
//----------------------------------------------
public Circle(double x, double y,double radius) {
this.x = x;
this.y = y;
this.radius = radius;
}

//----------------------------------------------
// getX - returns the value of x
//----------------------------------------------
public ______ getX() {
// Your code goes here
}

//----------------------------------------------
// getY - returns the value of y
//----------------------------------------------
public ______ getY() {
// Your code goes here
}
//----------------------------------------------
// getRadius - returns the value of radius
//----------------------------------------------
public ______ getRadius() {
// Your code goes here
}
//----------------------------------------------
// setX - assigns a new value to x
//----------------------------------------------
public ______ setX(_______________) {
// Your code goes here
}
//----------------------------------------------
// setY - assigns a new value to x
//----------------------------------------------
public ______ setY(_______________) {
// Your code goes here
}

//----------------------------------------------
// setY - assign a new value to radius
//----------------------------------------------
public ______ setRadius(_______________) {
// Your code goes here
}
//--------------------------------------------------------
// diameter - calculates the diameter of the circle
//--------------------------------------------------------
public ______ diameter() {
// Your code goes here
}

//--------------------------------------------------------
// area - calculates the area of the circle
//--------------------------------------------------------
public ______ area() {
// Your code goes here
}
//--------------------------------------------------------
// perimeter - calculates the perimeter of the circle
//--------------------------------------------------------
public ______ perimeter() {
// Your code goes here
}
//--------------------------------------------------------
// isUnitCircle - return true if the radius of this circle
// is 1 and its center is (0,0) and false
// otherwise.
//--------------------------------------------------------
public ______ isUnitCircle() {
// Your code goes here
}

//--------------------------------------------------------
// toString - return a String representation of
// this circle like
// center:(x,y)
// radius: r
//--------------------------------------------------------
public ______ toString() {
// Your code goes here
}
}

You might also like