CS 70

Homework 7

  • LHS Cow speaking

    This week you will practice the following:

    • Converting a class to a class template.
    • Adapting an implementation to a change in encoding.
    • Implementing a self-balancing binary search tree.
    • Testing the correctness of your data structure.

Getting Started

This assignment is paired, and your repository belongs to your pair. Your pairing for Homeworks 7 and 8 came from the Homeworks 7–8 pairing board, and the repository is named after your group—there is nothing to accept and no team to create.

Both of you have push access to that one repository, so you are working in the same place rather than each having a copy to reconcile later.

Clone your repository on the CS 70 server to get started:

git clone https://github.com/hmc-cs70-fall2026/repo.git

Steps

For these first two parts, the code is pretty much following the Homework 6 specification for tree functionality.

At this point, we'll begin enhancing our TreeSet class template, so you will want to read through the specifications below, but remember, you don't need to start implementing them yet! We'll guide you through the enhancements step-by-step.

As in other assignments, we encourage you to keep the specification document open in a separate window or tab for reference.

Ask for (and give each other) help!

Post your questions there, and be sure to answer each other's.

Resources

Please refer (frequently!) to these specifications for the data structure you will be implementing:

You may also want to review Section 16.1 of the

and, from our help section,


Grading

This assignment is graded in these parts:

  • your partner contract;
  • the written questions;
  • your code: the autograder (it builds without warnings, passes cpplint, has the right files, passes our tests, and your own tests catch our deliberately broken versions), and a code review of its clarity and style by the course staff;
  • your planning images (for completeness, not correctness);
  • and, if you take one on, the optional bonus work (bonus points).

Each question shows its points beside it, on its own page, so there's only one place to look. Your grade for the assignment is the percentage of its points you earned, which is what the gradebook shows.

(When logged in, completion status appears here.)