I need a java programer
Paid on delivery
Walking a Maze
The starting position for your jeroo will always be at location (1, 1). After running the maze, the jeroo should always end at the same position where it started.
The catch is that Maze Island changes every time. Sometimes it is wider, sometimes narrower--the only constant is that it is rectangular and surrounded by water. Flowers can grow anywhere and everywhere on the island. Also, there may be up to ten nets located on the island, although there will never be a net at the starting position, (1, 1). Your Jeroo is guaranteed that there will always be enough available flowers on the island plus its starting flowers to disable every net.
Further, you will have to write software tests to demonstrate your jeroo can handle this task.
How to Walk a Maze
While there are many strategies for navigating through a maze, one easy strategy is to simply hug the righthand "wall" (that is, water, or coastline) as you walk through the maze--you'll eventually make it all the way through the maze, back to your starting position (hugging the lefthand wall also works the same way, as long as you always stick to one side). If you traverse the maze completely, ending back at the starting location you are then ensured that all the flowers and nets have been cleared. You can use this strategy to create a simple maze walker (or runner) with just a few lines of code. Other strategies are possible, of course, so use the one you find easiest to understand.
Designing Your Solution
Download the scenario for this assignment, which contains the MazeIsland class: [login to view URL] Download program02-download.zip.
In the program02 project, you do not need to create any island subclasses. Instead, create your own subclass of Jeroo called MazeRunner, and structure all of your solution code in it (see below). You can give your MazeIsland a myProgram() method that will create an instance of your jeroo subclass, place it at the starting position, and call its clearMaze() method.
Constructor: Your MazeRunner class must provide a constructor that takes no parameters and that creates the jeroo holding 10 flowers facing EAST (a parameterless constructor is called a default constructor), with initial x, y coordinates of (1, 1). You can choose to provide additional constructors if you wish. Remember that constructors are not inherited by subclasses. However subclass constructors can invoke super class constructors using the super() keyword.
clearMaze(): Your MazeRunner class must also provide a method called clearMaze() that causes it to collect all flowers, disable all nets, and return to its starting position. The Jeroo must achieve this goal by walking through every location in the maze before stopping back at the starting position.
Other methods: You can divide your solution into as many other methods as makes sense. Your goal is to produce a solution that is readable and that completely solves the problem, with clear understandable methods of your own design. How many methods and how you name them are left up to you, but the quality of your work matters.
Apply the guidelines for breaking problems up into methods. Including methods that are too long, or methods with poorly chosen names, will negatively affect your grade on the assignment.
Also, be wary of writing complex or convoluted if statements or loops. Generally speaking, if it is hard to write it will also be hard to understand and there is probably a simpler cleaner alternative that would be more effective for this problem. In particular, remember that the more complex your logic is (the more if statements, while loops, or complex conditions you have), the more likely there will be mistakes.
The solution need to keep very simple, only using while loops and if statements within the methods
Project ID: #36699523