Write a program dist. that calculates the distance between two points and prints the result on the screen. The cartesian coordinates of the points would be given in the command line as 6 parameters. Your program should check if the number of arguments provided is correct and that the six coordinates are valid numbers of typedouble.dist.exe x1 y1 z1 x2 y2 z2For example, to calculate the distance between the two points (0, 0, 0) and (1, 1, 1), the program would be run as:dist.exe0 0 0 1 1 1and the screen output would be1.73205

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question

Write a program dist. that calculates the distance between two points and prints the result on the screen. The cartesian coordinates of the points would be given in the command line as 6 parameters. Your program should check if the number of arguments provided is correct and that the six coordinates are valid numbers of typedouble.dist.exe x1 y1 z1 x2 y2 z2For example, to calculate the distance between the two points (0, 0, 0) and (1, 1, 1), the program would be run as:dist.exe0 0 0 1 1 1and the screen output would be1.73205

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT