Additional Software Engineering Issues
Now that class
GradeBook is defined in a header, the class is reusable. Unfortunately, placing a class definition in a header as in Fig. 3.9 still reveals the entire implementation of the class to the class’s clients—
GradeBook.h is simply a text file that anyone can open and read. Conventional software engineering wisdom says that to use an object of a class, the client code needs to know only what member functions to call, what arguments to provide to each member function and what return type to expect from each member function. The client code does not need to know how those functions are implemented.
If client code does know how a class is implemented, the programmer might write client code based on the ...