Mid OOP

How do interfaces support loose coupling?

  • Code depends on interface, not concrete class.
  • Makes it easier to swap implementations without changing dependent code.

void StartVehicle(IDriveable vehicle) { vehicle.Drive(); }

More from C# Programming Tutorial

All questions for this course