0

Why is Abstract class useful?

9th Apr 2016, 5:53 PM
Abhishek Jain
Abhishek Jain - avatar
2 Réponses
+ 1
In OOP abstract classes are useful to implies what the class need to do, but without implementation (how to do). This enforce a class to follow the rule, in our example an Enemy need to attack, without the abstraction you can create an Enemy derivation without an attack, the pure virtual method force an implementation. That contributes to make good polymorphic classes.
7th May 2016, 3:50 AM
Rosemary Sumitani
Rosemary Sumitani - avatar
- 1
look at the last text in the abstract class section, it explains it
11th Jun 2016, 2:51 AM
Will
Will - avatar