Thread: Abstract Class
View Single Post
  #2 (permalink)  
Old 01-30-2008, 10:54 PM
tim's Avatar
tim tim is offline
Senior Member
 
Join Date: Dec 2007
Location: South Africa
Posts: 334
tim is on a distinguished road
Abstract classes
Hello gapper.

Classes are defined to be abstract if you know that instances cannot or should not be created from them. Like the class, Animal, should be abstract because we cannot create an animal with no information about it. But, we can create a Dog, which is a subclass of Animal. A family of classes containing abstract classes are usually designed so to prevent illegal usage and logical errors.
__________________
If your ship has not come in yet then build a lighthouse.
Reply With Quote