for example A,B,C,D are class all the 4 class contain one
method who() but the method who() implementaion is differnet
among each class. the relation among the 4 class are
A is base class and is inherited by B and C.and from this
two B and C where D is inherited.
the question is i want to display the output who() method in
all the classes(A,B,C,D)the output of who() method is
diferrent amond all the class(A,B,C,D)
------A------ virtuval who(print a)
override | |
who(print b) B C override who(print c)
| |
-------D------ override who(print d)
Answer Posted / ana
only pure virtual function cant be executed, so A.who() can
be executed
and since you override who() in B, C and D, the output is
different
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are benefits of oop?
Can a varargs method be overloaded?
Can destructor be overloaded?
What is meant by multiple inheritance?
What is destructor give example?
What is the renewal class?
is there any choice in opting subjects like 4 out of 7
i=20;k=0;
for(j=1;k-i;k+=j<10?4:3)
{
cout< What are constructors in oop? Are polymorphisms mutations? Where is pseudocode used? What is inheritance in oop? What is purpose of inheritance? What is abstraction example? What is abstraction in oops with example?