Interface Class

Briefly introduced in CS247.

Both Google C++ Style guide, and ISOCpp both recommend when using Multiple Inheritance, Interface Classes are best.

Interface classes are those that:

  • Define all methods as pure virtual
  • Contain no state (fields)

What is the point of interface classes?

An interface class in C++ serves as a blueprint for other classes. It declares methods without defining their implementation.

Interface (C++)

https://www.tutorialspoint.com/cplusplus/cpp_interfaces.htm