C++ Programming - OOPS Concepts - Discussion

Discussion Forum : OOPS Concepts - General Questions (Q.No. 15)
15.
Which of the following is an abstract data type?
int
double
string
Class
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
20 comments Page 2 of 2.

Suman.k said:   1 decade ago
A class is a user defined data type

Smitarani tandi said:   9 years ago
According to me a class is a pre defined data type so it is an abstract data type.

Avijit said:   9 years ago
Characteristics of Abstract Class.

1. Abstract class cannot be instantiated, but pointers and references of Abstract class type can be created.

2. Abstract class can have normal functions and variables along with a pure virtual function.

3. Abstract classes are mainly used for Up casting, so that its derived classes can use its interface.

4. Classes inheriting an Abstract Class must implement all pure virtual functions, or else they will become Abstract too.

Shubham said:   1 decade ago
http://en.wikipedia.org/wiki/Abstract_data_type#Examples.

It says Strings is an abstract data type.

Why isn't strings given as answer then?

Xzibit said:   1 decade ago
Abstract class means a class which can not have any object associated with it. But it can be inherited by other classes.

A class is basically said to be abstract class when it has at least one pure virtual function.

Eg:

class A
{
public:
virtual Func()=0;
};

Pratiksha said:   1 decade ago
What exactly abstract class means?

Sushil said:   1 decade ago
An abstract data type is defined as a mathematical model of the data objects that make up a data type as well as the functions that operate on these objects so we can say that class is the abstract data type in other words class contains both data members as well as member function hence class is abstract data type.

Bijay said:   1 decade ago
As per my understanding! what is use of abstract type, because we are putting some common elements & making a single element for the use of that one.

Shrikant Adsule said:   1 decade ago
Class is a user defined data type so it does not allowed any memory space, space is allowed only for object.

Priyanka p said:   1 decade ago
According to me, abstract data type is always serve as a base for other classes, so these type used for class.


Post your comments here:

Your comments will be displayed after verification.