|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectCircle
public class Circle
| Constructor Summary | |
|---|---|
Circle()
The diameter of the circle is 10cm by default. |
|
Circle(double d)
The circle can be initialized of other sizes. |
|
| Method Summary | |
|---|---|
double |
calculatetCircumference()
Calculate the circumference of the circle |
double |
getDiameter()
Return the diameter of the circle |
double |
grow(double factor)
Make the circle bigger |
double |
shrink(double factor)
Make the circle smaller |
java.lang.String |
toString()
Report the diameter of the circle by a string |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Circle()
public Circle(double d)
d - diameter of the new circle| Method Detail |
|---|
public double grow(double factor)
factor - Centimetres to be added to the diameter
public double shrink(double factor)
factor - Centimetres to be subtracted from the diameter
public double getDiameter()
public double calculatetCircumference()
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 | |||||||