Question: C. define the robot 1. Create a robot class that has the following data and function members: - a point object to store the robot's
C. define the robot 1. Create a robot class that has the following data and function members: - a point object to store the robot's current location in the world an enumerated data type, called orientation type, that defines the four directions that the robot could be facing (north, south, east or west), i.e., its "orientation" - a variable to store the robot's current orientation . void init0: This function initializes the robot's current location to (0, 0) and its current orientation to east + void print0 const This function prints the robot's current location and orientation in a pretty format, such as: I am at (0,0) and I am facing east. - void setOrientation( orientation type orientation): This function sets the value of the robot's orientation data member . bool forward0 This function simulates the robot moving forward one step in the direction that it is facing.It checks to make sure that the robot is not at the edge of its world. It returns true if the robot
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
