Question: Java need help with methods: This method will read the maze file and parse the maze to a 2d array of MazePoint objects. The input
Java need help with methods: This method will read the maze file and parse the maze to a 2d array of MazePoint objects. The input fileToRead is the filename of the maze you want to read. public MazePoint[][] readMaze(String fileToRead) throws IOException { // TODO: return maze; } This method takes in two parameters - a file name, and a 2-d array of MazePoint objects, which represents the expected array that the readMaze method should yield after reading the file. The function returns a boolean value - true if the expected array matches the array returned by readMaze, and false otherwise. If the test fails it should also print the expected maze and the actual maze returned by readMaze along with an error message.
public boolean testRead(String fileToRead, MazePoint[][] expected) throws IOException { return false; }
Thanks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
