public class PlanetUtil { public static double computeVolume(Planet1 p) { return 4 * Math.PI*Math.pow(p.radie, 3) / 3; }//computeVolume public static double computeDistance(Planet1 p1, Planet1 p2) { return Math.sqrt(Math.pow(p1.x - p2.x,2) + Math.pow(p1.y - p2.y,2) + Math.pow(p1.z - p2.z,2)); }//computeDistance }//PlanetUtil