Question: write a java program for the following question: Knight's tour problem Consider a NxN chessboard, with the Knight moving according to Chess rules. When it
write a java program for the following question:

Knight's tour problem Consider a NxN chessboard, with the Knight moving according to Chess rules. When it moves, it can move to a square that is two squares horizontally and one square vertically, or two squares vertically and one square horizontally. The complete move therefore looks like the letter L. The Knight may move at most in 8 different cells (see Figure below) We want to find a sequence of moves for the Knight where all cells in the chessboard are visited, but each cell is touched exactly once. The starting point is arbitrary Make a solution consisting of three classes: Chessboard, KnightMove and Cell. A Chessboard has (at least) two data fields: int size to specify the size of the chessboard (i.e. number of rows/columns), andint[ [ touched to indicate whether or not a certain cell is already touched. You might want to implement methods to occupy and free cells in the chessboard. A KnightMove has (at least) one data field: int offsets to specify the Knight's starting point on the chessboard. This class should have a method with the following header: ArrayList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
