Exams

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

The exams will focus on theoretical material, especially proofs of correctness. HW8-9 fall between the two exams and 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 HW8 and HW9) and should have easier problems than will appear on the final.

The midterm exam has four problems:

  1. Code Review: checking correctness of complex loops
  2. Writing Loops: writing loops given the invariant
  3. Writing Functions: writing correct code (given nothing)
  4. Testing

Here are some similar problems from homework and section materials:

  1. Code Review: Sec5 Q5; HW5 Q3; Sec6 Q1; HW6 Q2, Q3
  2. Writing Loops: Sec6 Q2; HW6 Q1, Q4, Q6
  3. Writing Functions: Sec6 Q3
  4. Testing: HW6 Q1 (and every previous homework)

Older Tests

Since students often ask for them, here are some additional practice exams. These are not necessary representative of our problems (since they are from different quarters and instructors), but they cover similar topics.

Test Code Review Writing Loops Writing Functions Testing
example final (soln) Q1 Q4 Q2, Q5
19wi (soln) Q1 Q2 Q5
16sp (soln) Q3 Q6 Q7

Note that our testing problem will differ from these. Rather than giving a template to fill in for each test, we will ask you to write the code that calls assert.deepStrictEquals for each test.

Final

The final will be longer (1 hour and 50 minutes, versus a 50 minute midterm), but will cover the same core material as the midterm. However, we will attempt to be slightly more comprehensive. The following are some examples of topics that could appear on the final:

  • Induction
  • Correctness of ADT methods
  • Subtypes, equality, design patterns
  • Startups

For the most of these topics, the homeworks and lectures are the best review material. For the second to last item, you can find some example problems on the 19wi exams page. However, note that these problems include some things we did not cover such as additional design patterns and details of Java equals and hashCode.