Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java needs help, thanks. The provided classes and sample data can be found in the dropbox link below (no virus!!), thanks: https://www.dropbox.com/sh/mb7moxsgx6r43n9/AADw5e3dNPqOAnixRMxUKt5ba?dl=0 Activities You are

Java needs help, thanks. The provided classes and sample data can be found in the dropbox link below (no virus!!), thanks:

https://www.dropbox.com/sh/mb7moxsgx6r43n9/AADw5e3dNPqOAnixRMxUKt5ba?dl=0

image text in transcribed

image text in transcribed

Activities You are to provide a JavaM class that implements the breadth-first search algorithm and another that implements the depth-first search algorithm. Your provided Java source code must be com- patible with a collection of provided Java classes that implement simple road maps, allowing your search algorithms to be used to find the shortest routes between locations on such maps. In- deed, your assignment solution will be evaluated by combining your submitted class files with copies of the provided map utility class files and testing the resulting complete program against a variety of test cases. In other words, your solution must work with the provided ilities, without any modifications to these provided files More specifically, you are to provide a class called BFSearch in a source code file named "BFSearch.java", and you are to provide a class called DESearch in a source code file named "DFSearch.java". The first of these classes is to implement a breadth-first search algorithm, and the second is to implement a depth-first search algorithm. Both classes must have the following features... a constructor that takes four arguments 1. a complete Map object, encoding the map to be searched 2. a String providing the name of the starting location 3. a String providing the name of the destination location 4. an integer depth limit for the search-if this depth is ever reached during a search (ie., a node at this depth or deeper is considered for expansion), the search should be completely abandoned and null indicating search failure) should be returned a method that actually performs the search, called search, with the following properties - it takes a single boolean argument if this argument is ""true", then repeated state checking should be performed, otherwise no such checking should be done during search - it returns a Node object from the search tree that corresponds to the target destination, or null if no solution was found a public integer instance variable called expansionCount that contains the number of node expansions performed during the most recent call to the search method Activities You are to provide a JavaM class that implements the breadth-first search algorithm and another that implements the depth-first search algorithm. Your provided Java source code must be com- patible with a collection of provided Java classes that implement simple road maps, allowing your search algorithms to be used to find the shortest routes between locations on such maps. In- deed, your assignment solution will be evaluated by combining your submitted class files with copies of the provided map utility class files and testing the resulting complete program against a variety of test cases. In other words, your solution must work with the provided ilities, without any modifications to these provided files More specifically, you are to provide a class called BFSearch in a source code file named "BFSearch.java", and you are to provide a class called DESearch in a source code file named "DFSearch.java". The first of these classes is to implement a breadth-first search algorithm, and the second is to implement a depth-first search algorithm. Both classes must have the following features... a constructor that takes four arguments 1. a complete Map object, encoding the map to be searched 2. a String providing the name of the starting location 3. a String providing the name of the destination location 4. an integer depth limit for the search-if this depth is ever reached during a search (ie., a node at this depth or deeper is considered for expansion), the search should be completely abandoned and null indicating search failure) should be returned a method that actually performs the search, called search, with the following properties - it takes a single boolean argument if this argument is ""true", then repeated state checking should be performed, otherwise no such checking should be done during search - it returns a Node object from the search tree that corresponds to the target destination, or null if no solution was found a public integer instance variable called expansionCount that contains the number of node expansions performed during the most recent call to the search method

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_2

Step: 3

blur-text-image_3

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

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions