logo CodeStepByStep logo

Skunk

("Critter" classes come from Marty Stepp's "Critters" homework assignment. See "Critters spec" link above for more information.)

The following Critter class named Skunk is an attempt to make a critter that goes W, W, N and repeats, unless he eats food, in which case he will start going W, W, S and repeats. But the code contains several errors. Download the code and fix the errors so it compiles and behaves properly.

Inheritance: Write a Java class using inheritance.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.