|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Circle
public class Circle
A class to represent a circle.
Constructor Summary | |
---|---|
Circle(double x,
double y,
double radius)
Create a circle object with center at point x,y and a given radius. |
Method Summary | |
---|---|
double |
getRadius()
Get the radius. |
double |
getX()
Get the x-coordinate of the center. |
double |
getY()
Get the y-coordinate of the center. |
void |
move(double newX,
double newY)
Move a circle object to a specified point. |
void |
setRadius(double newRadius)
Reset the radius to a specified value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Circle(double x, double y, double radius)
x
- the x-coordinate of the centery
- the y-coordinate of the centerradius
- the radiusMethod Detail |
---|
public double getX()
public double getY()
public double getRadius()
public void setRadius(double newRadius)
newRadius
- the new radius of the circlepublic void move(double newX, double newY)
newX
- the new x-coordinate of the centernewY
- the new y-coordinate of the center
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |