Question: We need to calculate how far a robot moved. From the first measurement, we know that it moved in the y direction a total of

 We need to calculate how far a robot moved. From the

We need to calculate how far a robot moved. From the first measurement, we know that it moved in the y direction a total of 67.2 cm. We are waiting for the user (an undergraduate research assistant) to tell us how far it moved in the x-direction. Our program should determine the angle that it moved relative to the x-axis and the total distance it moved. Write an error-free Java progra m to do the following things 1. Prompt the user to input an integer. The integer corresponds to the distance that the robot moved along the X-axis 2. There is an error with small distance measurements. Thus, if the y-distance is less than 6 cm, use the unary increment operator (+to add 1 to the x-distance. (Note: only increment the distance 1 cm no matter how small the distance.) 3. Display the x-distance. If applicable, you should display the value of the distance after it has been incremented. 4. Calculate and display the angle in degrees that the robot moved relative to the x-axis. 5. Calculate and display how far the robot moved in total along the hypotenuse (use Vr'). You should display the value and save it in a variable The output should look like the following DInput the x distance (cm) 5 .Robot moved 6 cm in the x direction. *Robot moved at an angle of 84.89783474764182 degrees. Robot moved 67.46732542497887 cm total Your output statements do not have to be exactly like the above but you need to display the data. The results of each calculation should be mathematically correct

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!