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

Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.

0 Answers  


How compiler selects(internally) required overridden function in inheritance?

2 Answers   CSC, Infinite Computer Solutions,


WAP to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)

1 Answers  


When is it necessary to use member-wise initialization list in C++?

2 Answers   Adobe,


What is abstraction with example?

0 Answers  


sir plz send me a set of questions that been frequently held in written examination during campus selection.

0 Answers   TCS,


Program to print 0 to 9 in cross order

3 Answers  


What is multilevel inheritance?

0 Answers  


How is polymorphism achieved?

0 Answers  


what is multi level inheritance give n example ?

13 Answers   HDFC, Hulas Steel, Ness Technologies,


What is new keyword in oops?

0 Answers  


create a c++ program that will ask 10 numbers and display their sum using array.

1 Answers  


Categories