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

I hv a same function name,arguments in both base class and dervied class, but the return type is different. Can we call this as a function overloading? Explain?

3 Answers  


What is stream in oop?

0 Answers  


What are the three main types of variables?

0 Answers  


How can i write a code in c# to take a number from the user and then find all the prime numbers till the number entered by the user.

4 Answers   NIIT, TCS,


What is friend function?

12 Answers   Wipro,






Write a program to sort the number with different sorts in one program ??

0 Answers   NIIT,


what is meant by files?

4 Answers   Infosys,


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,


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

0 Answers  


what is use to destroy an object? illustrate.

5 Answers   TCS,


What is the difference between Home and $Home?

2 Answers   TCS,


How do you achieve runtime polymorphism?

0 Answers  


Categories