You are allowed to include a constructor for your classes if you want, although it must be a zero-argument constructors (one that takes no arguments).

You are to implement five classes. The behavior of each class is described below.

Class getChar getMove

Bird B Randomly selects one of the four directions each time

Frog F Picks a random direction, moves 3 in that direction, repeat (same as bird, but staying in a single direction longer)

Mouse M West 1, north 1, repeat (zig zag to the NW)

Turtle T South 5, west 5, north 5, east 5, repeat (clockwise box)

Wolf You decide You define this

For the random moves, each possible choice must be equally likely. You may use either a Random object or the Math.random() method to obtain pseudorandom values.

The first four of these classes won’t use the CritterInfo object that is passed to getMove. This object is provided in case you want to do something with this information in defining your Wolf class. See the description of CritterInfo later in the writeup.

The critter world is divided into cells that have integer coordinates, much like the pixels in a DrawingPanel. There are 100 cells across and 50 cells up and down. As with the DrawingPanel, the upper-left cell has coordinates (0, 0), increasing x values move you right and increasing y values move you down.

Notice that the Critter class defines five constants for the various directions. You can refer to these using the name of the interface (Critter.NORTH, Critter.SOUTH, etc) or you can refer to them directly (NORTH, SOUTH, etc) because you are implementing the interface. Your code should not depend upon the specific values assigned to these constants, although you may assume they will always be of type int. You will lose style points if you fail to use the named constants when appropriate. As noted above, your critter can stay in its current location by indicating that the direction it wants to move is CENTER.

Here is an example implementation of the five classes described:

```java
import java.util.Random;

public class Bird implements Critter {

public Bird() {
// Zero-argument constructor
}

public char getChar() {
return 'B';
}

public int getMove(CritterInfo info) {
Random rand = new Random();
return rand.nextInt(4);
}
}

public class Frog implements Critter {

private int direction;
private int count;

public Frog() {
// Zero-argument constructor
direction = getRandomDirection();
count = 0;
}

public char getChar() {
return 'F';
}

public int getMove(CritterInfo info) {
count++;
if (count == 3) {
direction = getRandomDirection();
count = 0;
}
return direction;
}

private static int getRandomDirection() {
Random rand = new Random();
return rand.nextInt(4);
}
}

public class Mouse implements Critter {

private int count;

public Mouse() {
// Zero-argument constructor
count = 0;
}

public char getChar() {
return 'M';
}

public int getMove(CritterInfo info) {
count++;
if (count % 2 == 1) {
return WEST;
} else {
return NORTH;
}
}
}

public class Turtle implements Critter {

private int direction;
private int count;

public Turtle() {
// Zero-argument constructor
direction = SOUTH;
count = 0;
}

public char getChar() {
return 'T';
}

public int getMove(CritterInfo info) {
count++;
if (count % 5 == 1) {
direction = SOUTH;
} else if (count % 5 == 2) {
direction = WEST;
} else if (count % 5 == 3) {
direction = NORTH;
} else if (count % 5 == 4) {
direction = EAST;
}
return direction;
}
}

public class Wolf implements Critter {

public Wolf() {
// Zero-argument constructor
}

public char getChar() {
return 'W';
}

public int getMove(CritterInfo info) {
// You can define the behavior for the Wolf class here
return CENTER;
}
}
```

Note that the Wolf class is left blank, as the specific behavior for the wolf is not defined in the prompt. You can add your own implementation for the Wolf class based on the required behavior.