Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a program that loads a maze file and prints 1.the maze and 2.the maze with the shortest solution. The maze will be taken from

Create a program that loads a maze file and prints 1.the maze and 2.the maze with the shortest solution. The maze will be taken from a file maze.txt which will look something like this:

maze.txt

XXXXXXXXXXXXXXXXXXXXXXXXXXXX XS XXX X X X X XXXXXXXXXXXXXX X X XXX X X FX XXXXXXXXXXXXXXXXXXXXXXXXXXXX

The program should load the maze.txt into a graphical representaion of a maze then find the shortest path by first checking up, down, left, then right. If there is a solution, the program will output the maze with the path filled with a dot (.). If there is no solution, simply output No solution. Program should print out the initial maze first.

It is important to note that the program must be executable in the terminal by typing:

javac Maze.java

java Maze mazeFile

image text in transcribed

maze - Notepad File Edit Format View Help XS XXX FX 11/25/2017

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

More Books

Students also viewed these Databases questions