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
How do you explain polymorphism?
Why do we use oops?
Can an interface inherit a class?
What is the renewal class?
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
What is destructor give example?
What is abstraction in oop with example?
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
What are the 4 pillars of oop?
What is constructor in oop?
What is difference between inheritance and polymorphism?
write knight tour problem which is present in datastructure
How to improve object oriented design skills?
What is the difference between inheritance and polymorphism?
Why multiple inheritance is not allowed?