Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a class called Maze that includes a recursive call to find a path through a given text maze. The first 2 lines in the
Create a class called "Maze" that includes a recursive call to find a path through a given text maze. The first lines in the text file represent the size of the maze and the the next lines represent the starting location in the maze. A sample text file is attached. I will test your program on a similar text file. maze.txt Click for more options I would pick a separate characterletter to represent the path you are taking through the maze. Look for an E first, then if you can't find an E in the spaces around you, look for an O then if there is no O you must be trapped so look for a P if that is what you used to backtrack. You will first have to set up tp read in the maze text file. You must dynamically create a dimensional character array. Write a recursive method to "find your way" through the maze. Each recursive call will represent one move in the maze Think of the base cases then what would you look for next. This is not a long program, but a logic program. There is many solutions to this, but make sure what you submit is your own. Remember to copy your code into a word document and submit that document for a grade.
Create a class called "Maze" that includes a recursive call to find a path through a given text maze. The first lines in the text file represent the size of the maze and the the next lines represent the starting location in the maze. A sample text file is attached.
I will test your program on a similar text file. maze.txt Click for more options
I would pick a separate characterletter to represent the path you are taking through the maze. Look for an E first, then if you can't find an E in the spaces around you, look for an O then if there is no O you must be trapped so look for a P if that is what you used to backtrack.
You will first have to set up tp read in the maze text file.
You must dynamically create a dimensional character array.
Write a recursive method to "find your way" through the maze. Each recursive call will represent one move in the maze
Think of the base cases then what would you look for next. This is not a long program, but a logic program.
There is many solutions to this, but make sure what you submit is your own.
Remember to copy your code into a word document and submit that document for a grade.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started