What is an ABC: an "Abstract Base Class"?



What is an ABC: an "Abstract Base Class"?..

Answer / rohit sah

An Abstract Base Class is a class that is not intended to be instantiated itself. Rather, it is intended strictly for use as a base for other classes. To prevent instantiation, an ABC will typically contain at least one pure virtual function.

The point of an ABC is to separate the interface of a group of classes from the implementation of the functions that make up the interface. This allows other code to ignore differences in how these functions are carried out. An ABC creates a contract between its descendants and any other code that uses them. The descendants must implement a certain set of functions. Code that uses them must use those functions to access whatever it is the object involved represents.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

How much is size of struct having 1 char & 1 integer?

11 Answers   Persistent,


What are literals in C++?

0 Answers   Wipro,


Write a program to reverse a linked list?

8 Answers   Catalytic Software, Satyam,


What is the use of string in c++?

0 Answers  


What is static class data?

0 Answers  






What do you understand by a pure virtual member function?

0 Answers  


What compiler was used?

6 Answers   Intel,


In which memory a class gets stored(in heap /in stack)? And why??

2 Answers  


Why do we need runtime polymorphism in c++?

0 Answers  


Do vectors start at 0 c++?

0 Answers  


What is abstraction in c++ with example?

0 Answers  


What is iterator c++?

0 Answers  


Categories