Problem 1: Pick a Row . (create your own islands) | ||||||||||||||||||||||||||||||||||
|
Complete the code for the PickARow method and test to be sure that it works for islands like these. '*********************************************** 'Precondition: There is at least 1 flower directly ahead of the Jeroo 'Postcondition: All flowers that were directly ahead of the Jeroo have been picked '************************************************ Sub PickARow() End Sub |
|
Problem2: Find Water (create your own island) | |||
|
Write the code for a findWater() method. Whatever direction the Jeroo is facing, it will keep moving forward until it encounters water. Test your program thoroughly. '******************************************** Precondition: There is at least one clear space in front of the Jeroo and no obstacles (nets or other Jeroos) in its path Post condition: The Jeroo stops when it is facing the water. '******************************************* Sub FindWater() End Sub |
|
|
Problem 3: Circle the Ring: Combine Pick a Row and Find water. (uses islands: ring1 and ring2) | |||
The Ring Islands each have rows of flowers along each outer shore of the island. Write a program that uses the PickARow and FindWater methods to send a Jeroo from a starting location at (0,0) all the way around the island, picking each row of flowers as it goes. The same program must work for both islands with no modifications. Save as CircleRing. | ![]() |