Types and Interfaces
摘要
In the previous chapter we saw how to define well-encapsulated classes, but conveniently left out the question of how objects of these classes would interact. We now start addressing this question. Interactions between objects are mediated through interfaces. The term interface is overloaded in programming: it can have different meanings depending on the context.