After the presentation Algorithm development you should be able to:
STEP 1: Problem description: Jeroo 1 starts out at 0,0 with a single flower. Jeroo 2 starts out with a single flower. There is one net on the island. Direct Jeroo 1 to give its flower to Jeroo 2 . Then, Jeroo 2 must disable the net by tossing the flower on it, then plant a flower in its place and move to its ending position. ** What is missing in this problem description? ** see diagrams below and fill in missing information for step 1.
STEP 2: Analysis: diagram the problem (already complete, use this information to figure out what's missing in step 1 above)
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
Starting positions | Ending positions |
![]() |
net |
![]() |
flower |
![]() |
Jeroo 1 (facing north initially) |
![]() |
Jeroo 2 (facing east initially) |
STEP 3: Write the high-level algorithm
|
STEP 4: Write the detailed algorithm |
---|
STEP 5: Review of solution: