11-10 Class Notes CS 107

11-10 Class Notes CS 107 - 11-10 Class Notes CS 107...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Announcements : See changes to program #5 Questions? Last Time: Maze problem, comments on program Today: Finish the maze problem Comments on program #5 Linked List example (time permitting…) /** * Class Maze4 illustrates navigating a maze. * Once again the one-dimensional array representation is used. In * aaddition, an array is added to keep track of where we've come from, * and a boolean variable is added to mark when the solution has been * found to prevent further moves after the solution has been found. * * Running the program gives: 11, 12, 13, 22, 32, 42, 43, 44, 45, 46, 36, 26, 27, 55, 65, 64, 74, 84, 83, 82, 85, 86, 76, 77, 78, 88, Got to destination! * Pasted from < http://logos.cs.uic.edu/Examples%20And% 20Notes/notes/Java/Recursion/Maze1/Maze4.java > * Problems: * How can we display the solution path, with only the squares in the solution? */ public class Maze4 { private static int start = 11; // this is static so main() can use it private static int end = 88; // this is static so main() can use it
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

11-10 Class Notes CS 107 - 11-10 Class Notes CS 107...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online