Define abstract classes

Define abstract classes and also describe its distinct characteristics?

E

Expert

Verified

Abstract classes can be defined as the class which cannot be instantiated and are always used as the base class.
The characteristics of an abstract class are as follows:

i. Abstract class is always public

ii. We cannot instantiate the abstract class directly. Which implies that we cannot create the object of an abstract class; it should be inherited.

iii. Abstract class is declared by using an abstract keyword.

iv. We can have abstract as well as non-abstract members in the abstract class.

v. We must state at least one abstract method in a abstract class.
The central purpose of the abstract class is to offer a common definition of a base class which multiple derived classes could share.

   Related Questions in Software Engineering

©TutorsGlobe All rights reserved 2022-2023.