|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--csjs.shapes.Shape
|
+--csjs.shapes.GeoShape
|
+--csjs.shapes.GeoCircle
A 'geocircle' a circle located in 2-space
| Constructor Summary | |
GeoCircle(double r,
csjs.math.Point p)
Create a circle. |
|
| Method Summary | |
double |
area()
Returns the area of this geocircle. |
double |
diameter()
Returns the diameter of this geocircle. |
double |
distance(GeoCircle gc)
Returns the Cartesian distance between the receiving point and that given by the parameter. |
boolean |
equals(GeoCircle gc)
Returns true if the revieving geocircle and the parameter geocircle are equal; false if not. |
void |
expand(double a)
Expand this geocircle by augmenting its radius by the given number. |
double |
perimeter()
Returns the circumference of this geocircle. |
csjs.math.Point |
point()
Returns the point of this geocircle. |
double |
radius()
Returns the radius of this geocircle. |
void |
resize(double s)
Set the radius of the geocircle to the given number |
void |
set(csjs.math.Point p)
Sets the coordinates of the point |
void |
shrink(double a)
Shrink this geocircle by diminishing its radius by the given number. |
java.lang.String |
toString()
Write a description of this geocircle to the standard output file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public GeoCircle(double r,
csjs.math.Point p)
r - the radius of the geocirclep - the point of the geocircle| Method Detail |
public double radius()
radius in interface CircleADTpublic csjs.math.Point point()
point in interface GeoCircleADTpublic double diameter()
diameter in interface CircleADTpublic double area()
area in interface ShapeADTpublic double perimeter()
perimeter in interface ShapeADTpublic java.lang.String toString()
toString in interface ShapeADTtoString in class java.lang.Objectpublic void expand(double a)
expand in interface CircleADTa - amount by which the geocircle is expandedpublic void shrink(double a)
shrink in interface CircleADTa - amount by which the geocircle is contractedpublic void resize(double s)
resize in interface CircleADTs - size, in terms of radius, to which the geocircle is setpublic double distance(GeoCircle gc)
distance in interface GeoCircleADTpublic boolean equals(GeoCircle gc)
equals in interface GeoCircleADTgc - the "other" geocirclepublic void set(csjs.math.Point p)
set in interface GeoCircleADTp - the point
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||