Class Work
Topic 4 -2: Frog Escape

1. Complete Chapter 4, exercise 6 on page 111 from the Learning to Program with Alice textbook. The problem is restated here for those who do not have the book.

The point of this exercise is to create some world level methods that use parameters.

Frog Escape. At a local lily pond, the frogs (in Animal folder) enjoy climbing out of the water to warm up in the sun. They get a bit jumpy when a predator is sighted. In this movie, a hungry snake (Animals) wanders into the scene.

The initial scene can be downloaded from the web. The snake is off camera to the right and the program already has the snake sliding forward to enter the scene.

Complete the program as described.Animate the frogs jumping into the pond when the snake approaches them. Write a method that turns the snake toward a frog and slides the snake forward. Then, have the frog turn to the pond and jump in. The method should use a parameter to specify which frog is escaping.