Question: USING C++ Given an input maze and a starting location within the maze, you are to write a program which will determine the shortest path

USING C++ Given an input maze and a starting location within themaze, you are to write a program which will determine the shortestUSING C++

Given an input maze and a starting location within the maze, you are to write a program which will determine the shortest path out of the maze from the starting location. Create a basic graph from the input maze, then find a shortest path from s to e in that graph. A maze consists of the following 1. Paths, which will be represented by the space character (') 2. Walls, which will be represented by the pound symbol (#) 3. An entry or exit gate (e) 4. A starting location (s) The input file (maze.txt) is attached. The file format is as follows First line: dimensions of the maze- number of rows and then number of columns Second line through number of rows: the actual maze There will be several mazes to be processed in maze.txt. Your output should be written to a file called maze.out. There is a sample output file attached. Your output file should have this format. Print title for the file "Solutions for the Maze Assignment" Print your name - "" (The following will be repeated for each maze in maze.txt) The number of the maze that was processed- "Maze Number '" Print the maze showing your breadcrumbs (.) along the way The appropriate message either "There is a way out!" or "There is not a way out!" The files to be turned in: Application file: maze.cpp Header file implementing a graph class Test run file: maze.out Output: A shortest path thought the maze connecting the start with the end. Print a picture of the maze with some character used to denote the shortest path found connecting s to e

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!