Question: implement the JAVA code and post the JUNIT test case. generate a maze, first start with a grid of rooms with walls between them. The

implement the JAVA code and post the JUNIT test case.

generate a maze, first start with a grid of rooms with walls between them. The grid contains r rows and r columns for a total of r*r rooms. For example, Figure 1 is a 4x4 grid of 16 rooms. The missing walls at the top left and bottom right of the maze border indicate the starting and finishing rooms of the maze. Our objective here is to create aperfectmaze (see Figure 3), the simplest type of maze for a computer to generate and solve. A perfect maze is defined as a maze which has one and only one path from any point in the maze to any other point. This means that the maze has no inaccessible sections, no circular paths, no open areas.

 implement the JAVA code and post the JUNIT test case. generate

Second part :

Solve the Maze using DFS and BFS

Each search algorithm will begin at the starting room and search for the finishing room by traversing

wall openings. The search should terminate as soon as the finishing room is found. For

each search algorithm, you will output the order in which rooms where visited and indicate the shortest solution

path from starting to finishing room.Input:The program should accept the number of rows and columns r of the maze (use

only r=4,5,6, 7,8, 10).

Figure l Figure 2 Figure 3 Figure l Figure 2 Figure 3

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!