Day 14-Abstract class

The class which cannot be instantiated known as abstract class. Abstract class has no object. The purpose of an abstract class is to provide a common definition of a base class that multiple derived classes can share. Abstract class can contain abstract and non-abstract members. Abstract member has only declaration and non-abstract member has declaration and implementation in abstract class.


Properties of abstract class
  • Abstract class can contain only abstract members or only non-abstract members or both.
  • Abstract class cannot be instantiated.
  • Abstract method cannot be static.
  • Abstract method cannot be virtual.
  • Abstract method cannot be private.
  • A class cannot be inherit more than one abstract class. 
  • Abstract class can contain properties. 
  • Abstract method can be overloaded.