CS 70

Homework 4: Something Amazing

  • LHS Cow speaking

    In this homework, we're going to do something amazing! Mazes!

  • RHS Cow speaking

    Take a look at the image below. It's small enough that you can probably figure out how to solve if you stare at it for a bit. (Want a spoiler? Click the image!)

Maze

  • LHS Cow speaking

    Of course, that was a fairly small maze. But there's no upper limit on how big a maze could be, at least in principle. Here's a bigger one if you want to try it out.

  • Goat speaking

    Meh. Too much work.

  • Duck speaking

    I bet we could write a program to solve mazes!

  • LHS Cow speaking

    Funny you should say that, Duck. That's exactly what this assignment is about.

In this assignment, you will develop a program that can solve mazes of arbitrary size, using data structures you've made entirely from scratch (including making a class that works just like std::vector or Python's list()). In doing this work, you'll gain experience with

  • Writing code with dynamically allocated arrays of both primitives and objects on the heap.
  • Memory management using new and delete.
  • Debugging memory management problems with valgrind.
  • Evolving a codebase over time, including writing new classes from scratch.
  • Maintaining a Makefile.
  • Testing your code (using the CS 70 testing library).

Let's Go!

Both team members should accept the assignment:

Outline

Useful Information

Other Resources

You might find Sections 12.1 and 12.2 of the textbook, C++ Primer, 5th Edition, to be helpful.

As always, ask and answer questions on Piazza!

In addition, please review the following pages in the Help Pages:

(When logged in, completion status appears here.)