Sie sind auf Seite 1von 3

Pre-AP Computer Science 1 Lab Assignment

Mr. Fornal Juan Seguin High School Room A113


Lab 05 Maze 100 points
Al gori thm Devel opment i n Jeroo
Learning Goal
You will use the five-step process of algorithm development discussed in class to solve a
complex Jeroo problem. You will also make use of conditional and looping control
structures, and compound Boolean conditions using logical operators.
Instructions
Problem Description
A Jeroo just returned home from visiting a neighboring island only to discover that
heavy rains turned his island into a
veritable maze. There is a single
flower growing somewhere on the
island. The purpose of this program
is to have the Jeroo find and pick
the flower. The Jeroo is starting at
location 0,0, facing inland.
Fortunately, the Jeroo has 10
flowers in his pouch that he found
before the rainstorm. There is a
path to the flower, but there are
also many dead ends. There are
also up to 10 nets scattered
throughout the island. Help the
Jeroo find the flower.
It is up to you to ask the teacher if
you feel there are any unanswered
questions or ambiguities after you
analyze the problem.
You may be interested in researching the Right Hand Rule for solving mazes. A Left
Hand Rule would work, too. You just need to be consistently one rule or the other. You
cant switch it up.

Pre-AP Computer Science 1 Lab Assignment

Mr. Fornal Juan Seguin High School Room A113
Special Requirements
You will plan an algorithm that allows the Jeroo to find its way through the maze to the
flower at the end. Your main method should have exactly two lines of code. The first line
of code instantiates your Jeroo (you can decide its name) as a Jeroo with 10 flowers.
The second line will tell your Jeroo to solve the maze. Any additional code in the main
method will result in substantial penalties.
You are required to turn in your written algorithm for approval before you begin writing
any code. Do not write actual code until the teacher approves your plan.
Required Files
Use the provided file, named Jeroo Lab 05 Maze.jsc, and test your program with the
sample islands provided in the lab folder.
Algorithm Development
1. Describe the Problem
Is there anything ambiguous or unstated in the problem description on page one?


2. Analyze the problem
What are the givens for this problem? In other words, what specific information was
stated?


3. Create a high level algorithm (very broad steps)
In plain English, not Jeroo code, outline the broad steps for following the trail of flowers.






Pre-AP Computer Science 1 Lab Assignment

Mr. Fornal Juan Seguin High School Room A113
4. Stepwise Refinement (more detail, use back if needed)
Still writing in plain English, not Jeroo code, break down each of your broad steps into
more specific instructions.

















5. Test the algorithm
How will you test the algorithm?

Das könnte Ihnen auch gefallen