Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


what are abstract classes and how they impliment , with
example

Answers were Sorted based on User's Feedback



what are abstract classes and how they impliment , with example..

Answer / manoj kumar

abstract class is a class which may or may not contain
abstract method.
abstract class can,t be instantiated i.e. we can,t
create object of an abstract class.
abstract class can be subclasses .
abstract class is a class which is declared abstract.
if any class contain abstract method then it can be
declared abstract.
example
abstract class{

abstract public void display();//abstract method
}
abstract method is method which is declared but not
implemented i.e. without braces followed by semicolon.

Is This Answer Correct ?    8 Yes 1 No

what are abstract classes and how they impliment , with example..

Answer / rdl

A class with atleast one pure virtual function is called
abstract class.It cant be instatiated.It can be used as a
base class for other classes. The class derived from an
abstract base class can be instantiated,provided it should
implement the abstract base class pure virtual function.

Is This Answer Correct ?    7 Yes 0 No

Post New Answer

More OOPS Interview Questions

What are the main differences between procedure oriented languages and object oriented languages?

9 Answers   IBM, Infosys, Wipro,


Difference between new operator and operator new

2 Answers  


What is the main feature of oop?

0 Answers  


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

0 Answers  


WHEN A COPY CONSTER IS CALL ?

4 Answers  






What is a function in oop?

0 Answers  


Why do we use polymorphism in oops?

0 Answers  


What is difference between new and malloc?

7 Answers   emc2,


How Do you Code Composition and Aggregation in C++ ?

3 Answers   IBM, NET,


How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction

0 Answers  


different types of castings

3 Answers   Siemens,


There are 2 classes defined as below public class A { class B b; } public class B { class A a; } compiler gives error. How to fix it?

3 Answers   Microsoft,






Categories