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 lambda expression c++?

0 Answers  


1.Between 100 and 999 are some numbers that have the characteristics that if you cube the individual digits and sum together you will get the same number. 2. A program that can accept as input an integer and output the equivalent of that number in words.

3 Answers  


how can u create a doubly linked list with out using pointers?

2 Answers  


What does h mean in maths?

0 Answers  


Is c++ map a hash table?

0 Answers  






wap to accept 10 numbers & display the number of odd and even numbers??

1 Answers  


Why do we need function?

0 Answers  


Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300

0 Answers  


Using a smart pointer can we iterate through a container?

0 Answers  


Explain the differences between private, public and protected and give examples.

0 Answers  


Describe exception handling concept with an example?

0 Answers  


What is public, protected, private in c++?

0 Answers  


Categories