what are abstract classes and how they impliment , with
example

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1643


What is difference between oop and pop?

605


Why is polymorphism important in oop?

618


How many human genes are polymorphic?

562


Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?

4227






What is meant by oops concept?

600


When not to use object oriented programming?

560


Why polymorphism is used in oops?

575


What is object in oop with example?

684


What is difference between abstraction and encapsulation?

582


How do you achieve polymorphism?

603


What is difference between polymorphism and inheritance?

607


How do you define a class in oop?

612


Templates mean

1579


Why we use classes in oop?

567