I need a solution of this: A copy/paste of lines 11-15 of your modified DebuggerExercise.java file
Question:
I need a solution of this:
• A copy/paste of lines 11-15 of your modified DebuggerExercise.java file in the submission text box (as described in the instructions below).
• Your modified DebuggerExercise.java file
• Your modified WordFrequencyAnalayzer.java file
• A screenshot of what happens when you run HW1Test.java
Again, detailed instructions for each of these parts appear in the pages that follow.
1. Try running the DebuggerExercise.java file. You should see the following message in the console window at the bottom of the screen: Congratulations! You've found a way out of your labyrinth. Congratulations! You've found a way out of your twisty labyrinth.
2. Now change line 11 so that the String assigned to the YOUR_NAME variable is your full name. For example, if I were doing the assignment, I would change line 11 to be: private static final String YOUR_NAME = "Will Marrero";
3. Try running DebuggerExercise again. You should see the following message in the console window: Sorry, but you're still stuck in your labyrinth. Sorry, but you're still stuck in your twisty labyrinth.
4. Your task is now to change the Strings assigned to the variables PATH_OUT_OF_MAZE and PATH_OUT_OF_TWISTY_MAZE on lines 14 and 15 so that your get the success messages you saw in step number 1 with the new value of YOUR_NAME that you did in step number 2.
5. To do so, you will need to set a breakpoint on line 22 and then use the debugger to explore all the MazCells beginning with startLocation. You should draw out a picture of the various MazeCells and how they are connected together so that you can come up with a correct String value for PATH_OUT_OF_MAZE. Once you have solved that, you need to set a breakpoint on line 33 and repeat the process to find a correct String value for PATH_OUT_OF_TWISTY_MAZE. Details of what constitutes a correct path are provided below.
Maze Description
public class MazeCell {
public String whatsHere = ""; // One of "", "Potion", "Spellbook", and "Wand"
public MazeCell north = null;
public MazeCell south = null;
public MazeCell east = null;
public MazeCell west = null;
The MazeCell class is defined as follows:
MazeCell objects are connected to each other via the north, south, east, and west links. Exactly one MazeCall has whatsHere equal to "Potion", exactly one MazeCall has whatsHere equal to "Spellbook", and exactly one MazeCall has whatsHere equal to "Wand". All other MazeCell objects have whatsHere equal to "". You must come up with a sequence of moves (N to follow a north link, S to follow a south link, E to follow an east link, and W to follow a west link) that gets you from the MazeCell stored in startLocation or twistyStartLocation to each of the cells containing the potion, spellbook and wand (the order in which you gather the objects does not matter). An example of each follows.
First Maze (30 points)
The variable startLocation is the starting cell in the easy maze. In this maze, the cells are arranged in a grid in such a way that the directions in and out of each cell are consistent. That is to say:
• If cell1.west == cell2 then cell2.east == cell1
• If cell1.east == cell2 then cell2.west == cell1
• If cell1.north == cell2 then cell2.south == cell1
• If cell1.south == cell2 then cell2.north == cell1
Note however, that the values in some directions may be null, indicating there is no passage in that direction (even though there might be a cell in that direction). You will want to explore the maze using the debugger to look at how the cells are connected to each other and draw a picture for yourself. You can then use the picture to come up with the path. Below is a diagram of a potential easy maze. The smiley face indicates the value of stratLocation, and three other nodes have icons in them signifying the locations of the potion, spellbook, and wand.
First Maze (30 points)
The variable startLocation is the starting cell in the easy maze. In this maze, the cells are arranged in a grid in such a way that the directions in and out of each cell are consistent. That is to say:
• If cell1.west == cell2 then cell2.east == cell1
• If cell1.east == cell2 then cell2.west == cell1
• If cell1.north == cell2 then cell2.south == cell1
• If cell1.south == cell2 then cell2.north == cell1
Note however, that the values in some directions may be null, indicating there is no passage in that direction (even though there might be a cell in that direction). You will want to explore the maze using the debugger to look at how the cells are connected to each other and draw a picture for yourself. You can then use the picture to come up with the path. Below is a diagram of a potential easy maze. The smiley face indicates the value of stratLocation, and three other nodes have icons in them signifying the locations of the potion, spellbook, and wand.
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill