public class Point3D { private double x; private double y; private double z; public Point3D() {}//konstruktor public Point3D(double x, double y, double z){ this.x = x; this.y = y; this.z = z; }//konstruktor // metoden computeDistance beräknar avståndet mellan den aktuella punkten //och punkten other public double computeDistance(Point3D other) { return Math.sqrt(Math.pow(this.x - other.x, 2) + Math.pow(this.y - other.y, 2) + Math.pow(this.z - other.z,2)); }//computeDistance // Här skall finns fler metoder finnas såsom: // setX, getX, setY, getY, setZ och getZ } //Point3D