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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is java and c++?

875


What is a loop? What are different types of loops in c++?

827


What does iomanip mean in c++?

856


Is facebook written in c++?

748


How do you remove an element from a set in c++?

819


What is the extraction operator and what does it do?

812


What is different in C++, compare with unix?

800


How would you use qsort() function to sort an array of structures?

903


What is the limitation of cin while taking input for character array?

1709


How can you create a virtual copy constructor?

788


What is auto used for in c++?

769


What is a constant reference?

817


What is expression parser in c++

2133


Explain bubble sorting.

810


What are smart pointers?

1216