Question: Write an application which implements this graph maze using reference to a Node class. Each node in the graph will correspond to an instance of

 Write an application which implements this graph maze using reference to

Write an application which implements this graph maze using reference to a Node class. Each node in the graph will correspond to an instance of the Node class. The edges correspond to the links that connect one node to another and can be represented in Node as an instance variable which references another Node class. Start the user in node A. The users goal is to finish in node L. The program should output possible moves in the cardinal directions.

Include a main method in a class called Maze which can be used to test this maze. Sample output can be shown as follows:

You are in room A of a maze of twisty little passages, all alike. You can go east or south.

E

You are in room B of a maze of twisty little passages, all alike. You can go west or south.

S

You are in room F of a maze of twisty little passages, all alike. You can go north or east.

E

Save your submissions in Maze.java and Node.java (Use Java programming language )

Consider the following graph with edges and vertices defined as follows: North Start LFinish

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!