why we are declare the function in the abstract class even
though we are declaring it in Derived class?

Answer Posted / vishal

Abstract class is nothing but placeholder for other classes
ie subclass.It defines common shared behavior in abstract
classes and if we need to override we need to define in its
subclass else we can use shared behavior in base class.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you explain polymorphism?

684


Why do we use oops?

673


Can an interface inherit a class?

649


What is the renewal class?

2262


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

1810






What is destructor give example?

697


What is abstraction in oop with example?

743


Why is it so that we can have virtual constructors but we cannot have virtual destructors?

4045


What are the 4 pillars of oop?

755


What is constructor in oop?

691


What is difference between inheritance and polymorphism?

668


write knight tour problem which is present in datastructure

2247


How to improve object oriented design skills?

658


What is the difference between inheritance and polymorphism?

680


Why multiple inheritance is not allowed?

684