Question: in Task: Input the coordinates of two points in the Cartesian coordinate system. Calculate the distance between the points and the midpoint between them. The

 in Task: Input the coordinates of two points in the Cartesian
coordinate system. Calculate the distance between the points and the midpoint between

in Task: Input the coordinates of two points in the Cartesian coordinate system. Calculate the distance between the points and the midpoint between them. The program will be submitted in Java and also in C++. Also, include an appropriate algorithm. Input: Accept 4 real numbers from the user, representing coordinates x',y,"x,' and, . Processing: Note that the C++ cmath library includes two useful functions, pow and sqrt. Formulas distance: d-V(-x)+-) midpoint: 2 2 Output: Print appropriate labels, the original points, the distance, and the midpoint. Print the original points and the midpoint with one decimal position; print the distance with two decimal positions. Sample output (you may change the layout): Points: (3.0, 2.5) (-1.0, 4.0) Distance: 4.27 Midpoint

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!