class Vertex3d
{
public Vertex3d()
{
_x = _y = _z = 0.0;
}
public Vertex3d(double x, double y, double z)
{
this._x =x;
this._y = y;
this._z = z;
}
}
Note
Constructors
do not need to be public. For example, you could make a protected
constructor that is only accessible from derived classes. You could
even make a private constructor that prevents instantiation (for
utility classes) or is accessible only from other methods in the same
class (static factory methods, perhaps).