Question: 1. Solving a Maze. Your program will read in a text file which has 2 numbers on the first two lines. The first number is the number of columns and the second number is the number of rows in the maze. The numbers will be followed by grid of Xs and Os. The Xs represent walls while the Os represent pathways. The first row of the grid will have an S to mark the starting point, and the end will be marked with an E. There is only ONE correct path from S to E. Your program must find that pathway. Once your program finds the correct path you must replace the correct path by replacing only the correct Os with dashes (-).
For the above input the following should be the output on the screen when the toString is accessed:
• One constructor – with no parameters, this constructor will open a default.txt to look for the maze
• One constructor – which accepts a string parameter. This constructor will open the file represented by the string
• toString – Outputs the file being accessed and the solution pathway.
TutorTeddy.com & Boston Predictive Analytics
[ Email your Statistics or Math problems to email@example.com (camera phone photos are OK) ]
Boston Office (Near MIT/Kendall 'T'):
Cambridge Innovation Center,
One Broadway, 14th Floor,
Cambridge, MA 02142,
Dallas Office (Near Galleria):
15950 Dallas Parkway,
Dallas, TX 75248,