Workshop
The Workshop provides quiz questions and an exercise to help solidify your understanding of encapsulation and provide you with experience in using what you've learned. Answers are provided in Appendix A, "Answers to Quizzes."
Quiz
What's the recommended scope for member data in a well-encapsulated class design?
What's the purpose of encapsulation in class design?
What interfaces are available to users of an encapsulated class?
Exercise
Modify the Books class in Listing 3.5 to add a subroutine, FillList(), that queries the book data and loads the results into a supplied ListView object. By defining this subroutine, you extend the functionality of the Books class, which in turn removes the code from the user application.