September 2005
Intermediate to advanced
576 pages
14h 23m
English
Programmers learning Visual Basic 2005 often ask about the difference between Interfaces and Abstract Base Classes. The key difference is in the semantics, the meaning of the two constructs. An abstract base class serves as the base class for a family of derived classes, while interfaces are meant to be mixed in with other inheritance trees.
Inheriting from an abstract class implements the is-a relationship. Implementing an interface defines a different relationship: the implements relationship. These two relationships are subtly different. A car is-a vehicle, but it might implement the CanBeBoughtWithABigLoan capability (as can a house, for example).
Read now
Unlock full access