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

What is this weird colon-member (" : ") syntax in the constructor?

0 Answers  


Explain deep copy?

0 Answers  


How the keyword struct is different from the keyword class in c++?

0 Answers  


Define the process of handling in case of destructor failure?

0 Answers  


What is difference between n and endl in c++?

0 Answers  






What are enumerations?

0 Answers  


What is encapsulation in C++? Give an example.

0 Answers   HAL, Honeywell, Zomato,


What is difference between array and vector in c++?

0 Answers  


Which of the following operator cannot be overloaded?

2 Answers   TCL,


What is the full form of stl in c++?

0 Answers  


Explain the use of virtual destructor?

0 Answers  


How can you differentiate between inheritance and implementation in c++?

0 Answers  


Categories