Recitation 10

  1. Go back to a data abstraction that you studied or implemented in a previous course. For example, you could use this Bounded Buffer handout from CS 2110. Figure out what the representation type, abstraction function, and representation invariants are.

  2. When is it okay to violate the representation invariant inside of a function that implements an operation on a data abstraction? Does it depend on what other functions might be used in that implementation, or not?