Interfaces, abstract classes, abstract methods, and virtual Methods
Interface, abstract class, abstract function, virtual function
1. An interface is a variant of an abstract class. All methods of an interface are abstract methods and must be implemented by all the inherited classes. The interface can be indirectly instantiated.
2. the abstract class cannot be directly instantiated. It must be implemented as an abstract method for the base class to be implemented by the derived class. An abstract class can contain real methods (including method bodies ).
3. abstract methods do not provide actual implementations and can only be included in abstract classes. The method body must be forcibly overwritten by the derived class.
4. Features of common virtual methods. However, it is allowed (not required) to be overloaded by the derived class. (Override)