Lab 4 Challenge: Writing programs with loops and conditions.

Problem 1: LineUP: (use an empty island)

Four Jeroos are standing in a row on an empty island with space between them, all facing the same direction like the island above. Have them hop forward to line up so they are right next to each other like the island to the right.

You should create one method that can be used by all 4 Jeroos.

Save your code as LineUP yourName

Problem 2: LushTropical planting


Two Jeroos are enjoying a vacation on a lush, tropical section of the island filled with flowers. Each has one flower available. Create a program that uses methods to find the first available empty space no matter where they are standing and plant their flower. (Use island lushTropical.jev)

Save your code as LushTropical yourName

Problem 3: Minimum Break Through


A Jeroo is at position 23,12 in the southern field of flowers on NetLines1 island. The Jeroo can only carry 1 flower at a time on its way to reach the northern shore. Write the most efficient program possible to get through any island with any number of net barriers along column 12.

Try your program on NetLines2 and NetLines3