Abstraction
The word abstract means a concept or an idea not associated with any specific instance
In programming we apply the same meaning of abstraction by making classes not associated with any specific instance.
The abstraction is done when we need to only inherit from a certain class, but not need to instantiate objects of that class. In such case the base
class can be regarded as "Incomplete". Such classes are known as an "Abstract Base Class".
Abstract Base Class
There are some important points about Abstract Base Class :
The word abstract means a concept or an idea not associated with any specific instance
In programming we apply the same meaning of abstraction by making classes not associated with any specific instance.
The abstraction is done when we need to only inherit from a certain class, but not need to instantiate objects of that class. In such case the base
class can be regarded as "Incomplete". Such classes are known as an "Abstract Base Class".
Abstract Base Class
There are some important points about Abstract Base Class :
- An Abstract Base class can not be instantiated; it means the object of that class can not be created.
- Class having abstract keyword and having, abstract keyword with some of its methods (not all) is known as an Abstract Base Class.
- Class having Abstract keyword and having abstract keyword with all of its methods is known as pure Abstract Base Class.
- The method of abstract class that has no implementation is known as "operation". It can be defined as abstract void method ();
- An abstract class holds the methods but the actual implementation of those methods is made in derived class.
Comments
Post a Comment