Using Inheritance

Using inheritance, which of the following is not allowed
a) Changing implementation of operation in parent by the subclass
b) Using implementation of operation in parent class by the subclass
c) Using attributes in parent class by the subclass
d) Having operations is subclass which do not exist in parent class
e) None

Questions by aman_17it

Showing Answers 1 - 9 of 9 Answers

ajrobb

  • Sep 22nd, 2010
 

E

Using inheritance, which of the following is not allowed
a) Changing implementation of operation in parent by the subclass

If the parent defines a virtual method, the subclass can provide its own implementation. The object can still be referenced as a parent class object but its performance is modified.
b) Using implementation of operation in parent class by the subclass
Even if the subclass overrides a method, it can access the parent class's method using ::
c) Using attributes in parent class by the subclass
As long as attributes are not private they can be used by the subclass
d) Having operations is subclass which do not exist in parent class
Subclasses may implement extra methods
e) None
Yes.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions