Problems using loops
A Jeroo starts out in the middle of an island at (12,12) with 5 flowers. It must use it's flowers to break out of the encircling nets to reach the outer shore of the island. The program must use loops in the solution. Create a method called findNet() that tells a Jeroo to keep hopping until it is facing a net. Create a method called throughNet() that tells a Jeroo to use the findNet() method to find a net and then to toss a flower at the net to disable it. Fill out the TAG sheet when finished. |
Connect-the-dots. (uses islands Dot1 and Dot2)
Print code with GOOD STYLE. (comments, indentation, good method names) |
MineSweeper. A jeroo with 30 flowers in its pouch travels across an island one time from East to West disabling every net it finds in its path and replacing the net with a flower (first, toss a flower at the net to disable it, then hop forward and plant another flower to replace the net). Create a method called replaceNet() and another method called findNet() . The main program must use a loop to continuously find and replace nets until the shore is reached. This should work for any island. Save as MineSweeper. |
The Jeroo starts in a field of flowers on the south shore with no flowers. It can only hold one flower at a time in its pouch. It must figure out how to break through all of the nets on its way to the north shore of the island by returning to the flower field on the southern side each time it needs to break through another net. |