Hey guys.
I am confused by the abstract class and polymorphism.
Is it abstract class is one of polymorphism?
If it is, what kind of polymorphism is for abstract class?
Thanks for reading my post.
Polymorphism is when you allow accessing a derived class as a base class. This is useful for specifications and specialization per class. Polymorphism is available via base class pointers and base class references.
Abstract classes are class that contain at least one pure virtual function, meaning that at least one function has no definition. It's therefor not possible to instantiate from an abstract class. It is possible to instantiate from a derived class from the abstract class, as long as it has given definitions to the pure virtual functions.