Homework 5: Snaking a Path through Linked Lists and Iterators
Teaser…
We're continuing our theme of linear data structures. Last assignment, we showed how a maze solver could use a stack or a queue to explore the maze in different ways. In this week's assignment, we'll be using linear data structures in an interactive Snake game!
Overview
In addition to having fun with the Snake game, in this week's assignment, you will practice
- Planning the design and implementation the IntList data structure.
- Developing testing strategies to uncover bugs in your code.
- Implementing a singly linked list, providing constant-time steque operations and more.
- Implementing an iterator for your linked list.
- Implementing a copy constructor, assignment operator, and comparison operator for your linked list.
- Analyzing the complexity of your code from a theoretical and empirical perspective.
Let's Go!
Both team members should accept the assignment:
- Accept Starter Code on GitHub Classroom
- Use the same team you created for HW4.
Steps
- Part 1: Exploring the Snake Game
- Part 2: Designing the Queue Interface
- Part 3: Encoding an
IntList - Part 4: Implementing
IntList, Phase 1 - Part 5: Encoding an Iterator
- Part 6: Implementing
IntList, Phase 2 - Part 7: Implementing
IntList, Phase 3 - Part 8: Implementing
IntList, Phase 4 - Part 9: Written Questions
- Part 10: Check Your Work
Useful Information
Resources
You may find these resources helpful:
- Using
assert - Debugging Tips
- Also check out Using GDB if you want even more debugging power.
- Using
valgrindto Find Memory Leaks
Refresh your familiarity with the coding idioms we expect you to use:
As always, we encourage you to ask (and answer) questions on
as you work!
(When logged in, completion status appears here.)