<prompt> Kutokana na nguvu newtons, pembe digrii, na uzito kg, kuandika kazi ambayo mahesabu ya mwisho umbali kusafiri. Fikiria kitu haina bounce au roll. Tumia Java.3, 4, 5  <response>: Here is a Java function that calculates the final distance traveled:public double calcDistancedouble force, double angle, double weight double radians Math.toRadiansangle; double acceleration force weight; double time Math.sqrt2 weight Math.sinradians acceleration; double distance force weight Math.powtime, 2; return distance;To use this function with the given values, you would call it like this:double distance calcDistance3, 4, 5;System.out.printlndistance; 