Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please use java. 2. Write a program that prompts the user to enter three 3-dimensional points. Create a class MyPoint to store the values provided
Please use java.
2. Write a program that prompts the user to enter three 3-dimensional points. Create a class MyPoint to store the values provided by the user, the point class must have the following methods a. My Point (double x, double y, double z) b. void toString() Returns a string in the format" (x, y, z)" c. double distance (My point otherPoint) Returns the distance from this point to the otherPoint d. MyPoint getCenterPoint(MyPoint otherPoint) Returns the midpoint between this point and the otherPoint Enter point A: 2 2 5 Enter point B: 6 4 8 Enter point C: 12 0 -12 Distance from A to B : 5.385165 Distance from A to C: 19.824228 Distance from B to C: 21.260292 Midpoint of A and B: (4, 3, 6.5) Midpoint of A and c: (7, 1, -6.5) Midpoint of B and c: (9, 2, -2)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started