Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

With JAVA !!! Solve with directed graph data structure ! In this homework, you must implement your own graph data structure by taking inspiration from

With JAVA !!! Solve with directed graph data structure !

image text in transcribedimage text in transcribedimage text in transcribed In this homework, you must implement your own graph data structure by taking inspiration from your textbook and use it to help to solve problem. You are not allowed to use any external library or .jar file. Any solutions without using directed graph data structure are not evaluated! Q2(50 points): James Bond has a top-secret mission. He must enter a maze and find some treasures. In this homework, you should help him, and you are expected to create a maze solver algorithm. Lucky for you, you have a map of the mazes. These maps contain 3 groups of characters as shown in the example maze in the next page: - Walls are represented with " + ", "-", and "|" characters. When you see one of these characters, you cannot go any further. - Available paths are represented with lower case characters such as "a", "b", "c" and etc. When you see one of these characters, you can move forward. - Treasures are represented with capital " E " characters. When you see this character, this means that you can find a path successfully. For the above maze, there are 3 " E " characters, and all are reachable. Therefore, you should print all paths according to increasing order of paths lengths. You should read the maze file name from console. Here is the sample argument: The output for the above maze is as follows. Please check your program with this input as well as the others that you will create. Note that we will use other input when grading your assignments. Also, note that maze can contain a path that has a loop as shown in the following maze with a red box. For this case, your algorithm shouldn't get stuck in the loop. Therefore, you should avoid visiting already visited path

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

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions

Question

Identify some accounting sources of income distortion.

Answered: 1 week ago

Question

Who do you know that is a member of a microcultural group?

Answered: 1 week ago

Question

8. Managers are not trained to be innovation leaders.

Answered: 1 week ago