What is the concept of abstract classes?
When one is building a class hierarchy, it is common to design some classes that will never have any instances, and are intended to be used onlyby subclasses. For example, the Animal class in the animal hierarchy is such a class. There will never be an instance of an Animal. Instead, there would be more specialized subclasses of Animal such as Horse or Snake that would have instances. Classes that have no instances are called abstract classes.
Abstract classes usually define a common interface for subclasses by specifying methods that all subclasses must override and define. For example, the Animal class might define a method called reproduce. Since all animals reproduce, each subclass would have to define a reproduce method. But the definition of reproduce for the Animal class would be empty since it is an abstract class, and serves as a guideline or specification for derived subclasses.
A concrete class, on the other hand, is one that can have actual objects or instances. Dog and Cat are examples of concrete classes because there will be instances of Dog or Cat.
