Question

1) Implement a class Bug that models a bug moving along a horizontal line. The bug moves to either the right or left. Initially, the bug starts at a given position,

moves to the right, but it can turn to change its direction. In each move, its position changes by one unit in the current direction. Find the instance variable(s), define and implement the constructor(s), then supply the following methods: public void turn() public void move() public int getPosition()