Problems using loops

Break Out (uses islands: breakOut1, breakOut2 and breakOut3)

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)

  • A jeroo starts out in the middle of an island at (12,12) with 200 flowers. It travels north, planting flowers as it goes until it finds a flower straight ahead. Then the Jeroo looks to the left and right to decide what to do next.
    • If there is a flower only on the right, the Jeroo turns to the left and continues planting until it runs into another flower.
    • If there is a flower only on the left, the Jeroo turns to the right and continues planting.
    • If there are flowers on both the left and right, the Jeroo stops.

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.

breakfree1TOP GRADE: A trickier variation of Break Out called BreakFree. (uses islands breakFree1, breakFree2, breakFree3)

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.