+ 1
What is the use of pure virtual class?
1 Antwort
+ 2
It allows you to define some basic properties of those classes that inherit from it, to ease interactions with your code.
For instance: you have a program that will draw and update a chess board, but you're wanting to try multiple types of AI opponent. Define an abstract class which has the methods you need to let the plugged in AI play: ta-da, you create some child classes and experiment away. Or, even better, collaborate/crowd source the heuristics!
On the surface, they can seem a bit odd, but abstract classes (or interfaces as java tends them) do come in handy.