Exams

See the course calendar for the exact times and locations of the exams.

The exams will focus on the theoretical material, especially reasoning. In contrast, HW7-8, which fall between the two exams, will focus on practical skills, namely, building full-stack applications.

Midterm

The midterm exam is largely practice for the final. It is worth only half as many points (about the same as HW7 and HW8) and should have easier problems than will appear on the final.

Our midterm will have four problems covering most (but not all) of the following topics:

  1. Reasoning about Recursion: proving properties of recusive functions
  2. Reasoning about Loops: checking correctness of complex loops
  3. Writing Loops: translating recursion into loops
  4. Writing Methods: correctly implementing methods of a class
  5. Testing: testing functions or methods using our heuristics

If you understood how to solve all the homework problems, you should already be well prepared for the midterm. However, since students often request additional practice materials, here are some that you can look at:

Both of these exams include problems on Reasoning about Loops, Writing Methods, and Testing, which will appear on our midterm. They also include one problem on writing loops that would not be fair game for our midterm because it tests material from HW7, which will not be graded at the time of our midterm exam. Instead, our midterm will have a problem on either Writing Loops using a template or Reasoning about Recursion. Here are some examples from this quarter of those problem types, as well as the others mentioned above:

  1. Reasoning about Recursion: Sec4 Q2 Q3; HW4 Q3 Q5; Sec5 Q3; HW5 Q2 Q4
  2. Reasoning about Loops: Sec6 Q4; HW6 Q3 Q5
  3. Writing Loops: Sec6 Q5 Q6; HW6 Q6 Q7
  4. Writing Methods: HW5 Q3
  5. Testing: HW3 Q1(g); HW4 Q3(g) Q5(a); HW5 Q3(b,d) Q5(a,d)

The examples from section are more similar in difficulty to what would appear on an exam. While the examples from homework test knowledge of these topics at a deeper level, they are generally too lengthy for an exam.

Final

The final will be longer than the midterm, at 1 hour and 50 minutes. Rather than doubling the number of problems, the final exam will likely include some problems that involve more reading (making them not just more involved but also more realistic).

Like the midterm, the final will focus on core reasoning skills. All of the material covered on the midterm is also fair game also for the final. In addition, there are two kinds of problems that were not included in the midterm but could be included in the final:

  1. Writing the code of a for loop, given the loop idea and invariant.
  2. Writing or proving correct the methods of classes that implement mutable ADTs.
The final will also aim to be more comprehensive, so it may include small problems on any topic covered in lecture.

If you understood how to solve all the homework problems, you should already be well prepared for the final. However, since students often request additional practice materials, here are some that you can look at:

The final quiz section will also include some additional practice problems.