Define a class RobotArm that includes a data component, handOpen, that is either true or false and another private data member, position, that is a position in three dimensions. Include three constructors, a default constructor, a constructor that takes 2 parameters (one for the hand state and one for the position) and a constructor that takes four parameters (the hand state and the x, y, z coordinates of the position ). Assume that your program includes the definition of class Position3D defined above.
What will be an ideal response?
```
class RobotArm { public:
RobotArm () {}
RobotArm( bool, const Position3D& );
RobotArm( bool, double, double, double );
private:
bool handOpen;
Position3D position;
};
RobotArm :: RobotArm( bool handState, const Position3D& aPosition )
{
handOpen = handState;
position = aPosition;
}
RobotArm :: RobotArm( bool handState, double x1, double y1, double z1 )
{
handOpen = handState;
position = Position3D( x1, y1, z1 );
}
```
You might also like to view...
In a form, setting the Method attribute to ____________________ uses the browser default of the user's browser to send form data.
Fill in the blank(s) with the appropriate word(s).
Keywords cannot be used to name variables, constants, methods, or classes.
Answer the following statement true (T) or false (F)