+ 3
How can we make a class abstract?
4 Answers
+ 2
Add a pure virtual method:
class Shape {
public:
virtual void Draw() = 0;
}
+ 2
Create a class with all pure virtual methods.
+ 2
A class which has AT LEAST one pure virtual function is considered abstract.
It can have all types of members and functions (non-pure-virtual too) except that one function must be pure virtual (so that it satisfies above condition).
+ 2
Abstracr class with all pure virtual methods named interface.