class Sphere {
int radius = 0;
double xCenter;
double yCenter;
double zCenter;
Sphere() {
radius = 1;
}
Sphere(double x, double y, double z) {
this();
xCenter = x;
yCenter = y;
zCenter = z;
}
Sphere(int theRadius, double x, double y, double z) {
this(x, y, z);
radius = theRadius;
}
// Create a sphere from an existing object
Sphere(final Sphere oldSphere) {
radius = oldSphere.radius;
xCenter = oldSphere.xCenter;
yCenter = oldSphere.yCenter;
zCenter = oldSphere.yCenter;
}
}
|