|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectCircle
public class Circle
| Field Summary | |
|---|---|
private static int |
numberOfObjects
The number of the objects created |
private double |
radius
The radius of the circle |
| Constructor Summary | |
|---|---|
Circle()
Construct a circle with radius 1 |
|
Circle(double newRadius)
Construct a circle with a specified radius |
|
| Method Summary | |
|---|---|
boolean |
equalRadius(Circle c)
compare radius with that of circle c |
static int |
getNumberOfObjects()
Return numberOfObjects |
java.lang.String |
toString()
Return string representation of circle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private double radius
private static int numberOfObjects
| Constructor Detail |
|---|
public Circle()
public Circle(double newRadius)
newRadius - - double, the radius of the new Circle object| Method Detail |
|---|
public boolean equalRadius(Circle c)
c - the Circle object that the current Circle will be compared to
public static int getNumberOfObjects()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||