What is an abstract class?
In object -oriented programming, an abstract class provides a basic class that can be used to provide other classes with partial implementation and interface. They themselves are incomplete and are used in inheritance situations in many programming languages such as Java, C ++ and C#. Their use as a base class means that they are often referred to as an abstract base class (ABC).
An integral part of object -oriented programming, data abstraction removes unnecessary details of the object. Basically, the object is hesitant about its main identification characteristics. These basic characteristics provide a plan that can be used to create other objects with the same properties that differ only in detail.
This plan is defined as a class. Classes are used to encapsulate code and facilitate the programmer because it can refer to specific common routines instead of writing routin over and over again. Programmers create children's objects from classes and these Objects inherit functions and METody within a superior class.
The purpose of an abstract class is to be a frame on which other classes are created. Objects cannot be created directly from the abstract class, only from subclass belonging to the abstract class. In order to inherit the object from an abstract class, a subclass must be created. Objects created by subclass of abstract class inherit the properties of this abstract class.
Each class models concept and abstract classes tend to model more abstract concepts using abstract methods. Abstract methods are subroutines within an abstract class that contains no implementation. These subroutities are used as surrogate symbols to be rewritten by a subcontract or an object designed on the basis of a class that contains the abstract method itself.
There are different ways of creating an abstract class. For example, in C ++ and BSTRACT ASSAGROUND IS CALLY CLASS SHOULD DEVELOPMENTethod or pure virtual function. Java uses the keyword "abstract" to indicate an abstract class. However, they are not defined in programming languages that do not support the idea of inheritance.
Inheritance is the process of creating new objects from classes where new objects can use functions and methods defined in their parental classes without the need to rework the program. Therefore, an abstract class is useful. Classes of children and children's objects of these subclass will inherit the properties from the superior abstract class. The abstract classes are considered to be super classes and are on top of the class hierarchy, so they make no sense in a language that does not support heritage.