Now we have a
Sedan class and
Truck class that implement the
IAutomobile interface. Though they have some different behaviors, they both have the properties and method defined in the interface:
At this point we can be confident that we won’t cause any errors if we try to access these members in either the
Create two sedans and a truck:
Console.WriteLine() statements that print the automobiles’
SpeedUp() on all three automobiles.
Console.WriteLine(), print out the three automobile’s new speeds.