Question: Object Orientated Programming, JAVA Write a class named Robot that takes a point (x.y) to represent a robot's initial location (in centimeters) as well as
Object Orientated Programming, JAVA

Write a class named Robot that takes a point (x.y) to represent a robot's initial location (in centimeters) as well as its orientation (an angle called theta which is a value between 0 and 360 degrees). You can either set these values in your code directly or ask the user for them (using the Scanner class). They could all be integers. Assume the robotmoves forward d centimeters. Compute and display the final location ofthe robotafter it moves. The new location is computed as point (x d cos(theta), y + d sin(theta)). Remember that the sine and cosine functions in JAVA use radians, not degrees. To convert degrees to radians, you need to multiply the degrees by Math.PI/180 and if you need to convert from radians to degrees you can multiply the radians by 180/Math.PI Write a class called RobotTestto test your code..remembering that 0 degrees is to the right (as shown below in red), 90 degrees is up, 180 degrees is left and the angle theta shown below is around 135 degrees. x-axis (cm)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
