The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
If someone can send me this answer by 11:00PM EST (about 30 minutes), I will pay $50.Â
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 "distBetweenPoints" 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Â )
To submit, save all files (in "zip" format) and upload as "PointApplication.zip"Â