
1. a. (i) Refer 1(a) of June-July 2009.
(ii) Refer 1(b) of June-July 2009.
1. b. An interface defines what some body of code does for its users, how the functions
and perhaps data members can be used by the rest of the program. Our CSV interface
provides three functions—read a line, get a field, and return the number of fields—
which are the only operations that can be performed.
To prosper, an interface should be well suited for its task—simple, general
regular, predictable, and robust—and it should adapt gracefully as its users and its
implementation change. Good interfaces follow a set of principles.
Hide implementation details. The implementation ...