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 are the important differences between c++ and java?

708


When is dynamic checking necessary?

676


Why is the function main() special?

704


write asingle linked list which read from two list & the do the following 1 sort the prime & nonprime num (prime should be less tn nonprime) 2 each node has a prime num followd by nonprime 3 add a new node into its sutable plce 4 erase the most three duplicated non prime num 5 find the least duplicated prime num

2298


How to declare a function pointer?

676






Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].

1075


Is c++ a low level language?

605


Explain the problem with overriding functions

682


What is an iterator class in c++?

697


What are the advantages of c++ over c?

695


What is void pointer in c++ with example?

676


Please explain the reference variable in c++?

703


What is the basic difference between C and C++?

709


Why isn't sizeof for a struct equal to the sum of sizeof of each member?

625


What is abstract keyword in c++?

709