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 is the expansion of OOPS?

24 Answers   TCS,


What is difference between abstraction and encapsulation?

0 Answers  


What is oops in programming?

0 Answers  


What is encapsulation selenium?

0 Answers  


what is the difference between function template and template of function?explain with example.

2 Answers  






Program to check whether a word is in all capital letters

1 Answers  


me get an assignent n its question is this 1.creat a set as in math i.ea={1,2} 2.insert element in it3. delete element don,t repeat any element 4.union 5. intersection of two sets plz help me i always pray for u n send me at ayeshawzd@hotmail.com f u have c++ how to program 5th addition then it is the 10.9 question in 10th chapter exercise

1 Answers  


what is virtual function?

26 Answers   Aspire, HP, Infosys, RoboSoft, TCS,


Why we use classes in oop?

0 Answers  


Should you protect the global data in threads? Why or why not?

2 Answers   IBM,


This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.

0 Answers  


what is the difference between inter class and abstract class...?

0 Answers  


Categories