Question: I need to write an error free java program following these steps We need to calculate how far a robot moved in the x and

 I need to write an error free java program following these

I need to write an error free java program following these steps

We need to calculate how far a robot moved in the x and y directions. We prompt the lowly undergraduate research assistant to input the total distance the robot moved and at what angle relative to the x axis. We then want the program to calculate and display how far the robot moved in the x and y directions. Write an error-free Java program to do the following things. Prompt the user to input a number. The number (maybe a decimal) corresponds to the angle that the robot moved relative to the x axis. The user will enter the angle in degrees. 1. Prompt the user to input the total distance that the robot moved from the origin (Assume that the distance is in cm.) 2. The angle is not very accurate, so the angle value entered by the user should be rounded to the nearest integer. Also, if the angle is less than 4 degrees, use the unary increment operator) to add 1 to the (rounded) angle. 4. Display the angle in degrees. If applicable, you should use the value of the angle after it has been rounded and incremented 5. Calculate and display how far the robot moved along the x and y axes. You need to save the results from the x and y values in a variable. (You may assume that the angle is between 0 degrees and 90 degrees.) When you display the x and y results, only display the total distance moved in that direction you do not need to display whether it is in the positive or negative direction 6. The robot can flyt Assume the robot takes of f and flies straight up (z direction) a distance of 12.5 cm. Calculate and display the distance from the origin for the new location

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!