Accepted Answer
Using the knowledge in computational language in JAVA it is possible to write the code that define a procedure “DistanceBetweenTwoPoints” that will take four paramaters x1, y1, x2 and y2.Writting the code:package org.totalbeginner.tutorial;public class Point { public double x; public double y; Point(double xcoord, double ycoord){ this.x = xcoord; this.y = ycoord; } public double getX() { return x; } public double getY() { return y; } }package org.totalbeginner.tutorial;public class Line { double x; double y; Point p1 = new Point(2.0,2.0); Point p2 = new Point(4.0,4.0); Point mp = new Point(x,y); public void midpoint() { x = (p1.getX() + p2.getX()) / 2; y = (p1.getY() + p2.getY()) / 2; }See more about JAVA at brainly.com/question/12975450#SPJ1