/**
 * Point3d is one of the simplest possible classes we will
 * show off in this course.  It has fields with their
 * respective getters and setters and nothing else.
 * 
 * Walker White
 * January 26, 2012
 */
public class Point3d {
  
    /* These are the three coordinates. */
    private double x; // x coordinate; no restrictions
    private double y; // y coordinate; no restrictions
    private double z; // z coordinate; no restrictions
    
    /** 
     * Constructor:  a point at the origin 
     * Precondition: None
     */
    public Point3d() {
        x = 0.0;  
        y = 0.0;  
        z = 0.0;
    }
    
    /** 
     * Constructor: a point with given coordinates (x0,y0,z0)
     * Precondition: None
     */
    public Point3d(double x0, double y0, double z0) {
       x = x0;
       y = y0;
       z = z0;
    }
    
    /** Yields: this Point's x coordinate */
    public double getX() {
        return x;
    }
    
    /** Assigns value to x coordinate */
    public void setX(double value) {
        x = value;
    }
    
    /** Yields: this Point's y coordinate */
    public double getY() {
        return y;
    }

    /** Assigns value to y coordinate */
    public void setY(double value) {
        y = value;
    }
    
    /** Yields: this Point's z coordinate */
    public double getZ() {
        return z;
    }
    
    /** Assigns value to z coordinate */
    public void setZ(double value) {
        z = value;
    }
    
}