Create a public class point that contains attributes x y


Create a public class "Point" that contains attributes "x", "y", and "z" (all of type "double"), a 3 argument constructor (i.e., to initialize the coordinates), mutator and accessor methods, and an static method "dist Between Points" that receives two Point references and returns the distance between the two points represented by the references to the "Point" instances.  In addition, create a second public class "PointTester" that contains the "main" method that performs the following

1.  Prompts the user for the x, y, and z coordinates.

2.  Creates a "Point" instance named "Point1"

3.  Prompts the user for the x, y, and z coordinates.

4.  Creates a "Point" instance named "Point2"

5.  Displays the distance between the two points.

Distance between two points can be determined by the following formula, dist = SQRT ( (x2 - x1)2 + (y2 - y1)2 + (z2 - z1)2 )

Solution Preview :

Prepared by a verified Expert
Business Economics: Create a public class point that contains attributes x y
Reference No:- TGS02212939

Now Priced at $25 (50% Discount)

Recommended (97%)

Rated (4.9/5)