An Interface class is just an empty class template containing procedures to implement
class methods and properties as discussed in the subsections immediately following
"Implementing COM Components Through Class Modules"
chapter. You don't normally put any code or Private variable declarations in an
Interface class, only the blank procedures.
Therefore, the entire contents of an IVehicle Interface class might look like Listing 12.17.
THIS IS ALL THE CODE REQUIRED TO SET UP THE IVEHICLE
Public Property Let Color(newval As Long)
Public Property Get Color() As Long
Public Property Get MaxSpeed() As Single
Public Property Let MaxSpeed(newval As Single)
Public Function Travel(xStart, yStart, xEnd, yEnd)
Notice that the IVehicle Interface provides
two properties (Color and MaxSpeed) and one method
You specify the type of each property and the number and type of the parameters
that the method receives as well as its return value. You specify absolutely no
behavior beyond this, however. The way that these members will function depends
completely on the programmer who uses this Interface in other classes.