Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

write java code that implements a class Robot that modles a robot on a infinite

ID: 3671900 • Letter: W

Question

write java code that implements a class Robot that modles a robot on a infinite 2-d plane.(There are no boundaries to our grid- you do not need to provide error checking for your move method)The robot is located at a ppoint with integer coordinates
and faces either north,east,south, or west. Create appropriated instance variables for your class. Supply the following methods for your class:
Public String getDirection()
public void turn()
public void turnAround()
public void move(int distance)
The turn method changes the direction the robot is facing by 90 degress clockwise but not the location.(So if the robot is acing North, after calling turn it should be facing East)
The turnaround method change direction the robot is facing by 180 degress but not the location
(So if the robot is facing North, after turnAround it should be facing South). The move method moves the robot by distance unts in the direction it is facing.
The getDirection method returns a string "N", "E" , "S", or "W". You need to supply a appropriate instance variables for this class to implement these methods.
DO NOT FORGET TO WRITE AS A TESTER AS WELL> NEED TO BE SEPARATE

Explanation / Answer

Executing the Program