Lab - Interfaces

Okay, just follow along, questions will be denoted with a Q.

Interfaces

Q 1 Describe what is meant by each of the following:

  1. Hide implementation details
  2. Choose a small orthogonal set of primitives
  3. Don't reach behind the user's back
  4. Do the same thing the same way everywhere

CSV implementation

Q 2 What are the problems w/the first implementation in C (Labs/Interfaces/csvgetline1.c)?

Q 3 What things were improved upon in the first revision in C?

Q 4 What problems does the first revision (Labs/Interfaces/csvgetline2.c) still have? Can you parse 2 different CSV files at the same time? Explain.

Q 5 Does the C++ implementation solve these problems? What issues still remain?

Q 6 Does the interface for the C++ implementation adhere to our guidelines for a good i/f, from lecture?

Q 7 Implement a Java version of the CSV library, and test:

Some specifications for what a CSV is: