/** An instance is a coordinate in three dimensions */
public class IntPoint3d {
    
    // This instance represents the point (x, y, z)
    private int x;
    private int y;
    private int z;
    
    /** Constructor: an instance with coordinates (a,b,c) */
    public IntPoint3d(int a, int b, int c) {
        a = x;
        b = y;
        c = z;
    }
    
    // Getter methods
    /** Yields: the x-coordinate of this point */
    public int getX() { 
        return x;
    }
    
    /** Yields: the y-coordinate of this point */
    public int getY() {
        return y;
    }
    
    /** Yields: the z-coordinate of this point */
    public int getZ() {
        return y;
    }
 
    /** Yields: "at least one of the coordinates of this point is 0" */
    public boolean hasAZero() {
        return x == 0  &&  y == 0  &&  z == 0;
    }
    
    /** Yields: length of line from (0,0,0) to this point. */
    // Add your function here.
    // Use method header:
    // public double length()
    
    /** 
     * Averages this point with the IntPoint3d q. That is, this procedure assigns new
     * values to the fields so that each coordinate is the average of the old
     * value and the corresponding coordinate of q.
     * For example, if this IntPoint3d is (2,4,4) and IntPoint3d q is (4,6,-8), then 
     * this procedure assigns x = (2+4)/2 = 3, y = 5; and z =-2.
     */
    // Add your procedure here.
    // Use method header:
    // public void averageWith(IntPoint3d p)
}