Question: Write a class Butterfly that extends the Critter class, along with its movement behavior. All unspecified aspects of Butterfly use the default behavior. A Butterfly
Write a class Butterfly that extends the Critter class, along with its movement behavior. All unspecified aspects of Butterfly use the default behavior.
A Butterfly should be yellow in color. Its toString should alternate between being an x character and a - character each move.
A Butterfly flies upward in the following pattern: N, W, N, E, repeat.
Solve this program in jGRASP using the CritterMain simulator.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
