Walking The Lake

Major Programming Topics

- cascaded if
- recursion opportunity

Statement of the Problem
Monsoon rains have created a lake in the middle of Santong Island. Furthermore, that lake contains an island. Two Jeroos were separated by the rains. One is on the main part of Santong Island, but the other is on the island in the middle of the lake. The goal of this program is to have each Jeroo explore their shoreline of the lake. Each Jeroo starts with one flower and the lake immediately to its right. Each Jeroo starts by planting a flower then travelling, always following the lake on its right without skipping any shore line, until it returns to the flower. The Jeroo then picks the flower. Have the Jeroo on the main part of Santong Island walk the shore first, then have the one on the lake’s island walk the shore.


A Possible Island Layout

Acknowledgement
This problem is adapted from one that was created originally by Erica Eddy of The University of Wisconsin – Parkside.