Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is an ABC?

abc
0
Posted

What is an ABC?

0

An abstract base class. At the design level, an abstract base class (ABC) corresponds to an abstract concept. If you asked a mechanic if he repaired vehicles, he’d probably wonder what kind-of vehicle you had in mind. Chances are he doesn’t repair space shuttles, ocean liners, bicycles, or nuclear submarines. The problem is that the term “vehicle” is an abstract concept (e.g., you can’t build a “vehicle” unless you know what kind of vehicle to build). In C++, class Vehicle would be an ABC, with Bicycle, SpaceShuttle, etc, being derived classes (an OceanLiner is-a-kind-of-a Vehicle). In real-world OO, ABCs show up all over the place. At the programming language level, an ABC is a class that has one or more pure virtual member functions. You cannot make an object (instance) of an ABC.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.