what is abstract class ?
when is used in real time ?
give a exp

Answer Posted / pradeep

An Abstract Class is one in which the member function(s) at
the Base(Parent) Class are left undefined, but declared.
It's upto the Derived(child(ren)) Classes to Implement the
Functions declared in Base...

The most real time example of abstract class and interface
is bulding a house
1)concrete methods are explained with completed house.
2)abstract classes are explained with completed house but a
little bit of work left
3)interfaces are explained with taking a building plan

Is This Answer Correct ?    7 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }

1993


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

1703


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

1658


What is interface in oop?

664


Why do we need polymorphism in c#?

695






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

3559


what type of questions

1697


What is the purpose of enum?

585


What are the components of marker interface?

608


What is polymorphism and its types?

603


Can we override main method?

609


• What are the desirable attributes for memory managment?

1732


What is a class oop?

594


What is static modifier?

638


What is abstract class in oops?

604