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 abstract data type in object oriented programming?

0
10 Posted

what is an abstract data type in object oriented programming?

0
10

An abstract class is a generalization concept. It is a class you invent to only use as a base class for inheritance but not to instantiate objects from. And abstract datatype is not necessarily an OOP concept. It is an older term to describe the concepts of for example Stack and Queue in terms of their functionality, without describing the implementation. Since you are probably interested in abstract class, a small example: Suppose you have to make a program to deal with cars and motorbikes. You can define the classes (entities) of Car and Bike and you will see they have much (but not all) functionality in common. It would be a mistake to derive Car from Bike or the other way around. What you need to do is to define a common abstract base-class MotorVehicle and derive both Car and Bike from that class.

Related Questions

What is your question?

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

Experts123