If a base class is very general you can prevent instantiation of this class by making it abstract.
Example:
Polygon-->Quadrilateral-->Square
Here you make Polygon abstract. What would you want to do with a Polygon?It just holds some common properties for a triangle,rectangle etc. Even Quadrilateral could be abstract. The class you want to work with here is a Square. Square will never be abstract you must be able to instantianate a Square into an object to work with.
Reputation Points: 2035
Solved Threads: 644
Senior Poster
Online 3,738 posts
since Oct 2008