CBSE Computer Science - Revision Tour(Solved) CBSE Guess > eBooks > Class XII > CBSE Computer Science inheritane Solved Revision Tour By Mr. Ravi Kiran COMPUTER SCIENCE INHERITANCE OUT SIDE DELHI 2007: 2.a) Differentiate between Protected and Private members of a class in context of inheritance using C++. 2 Ans: Protected members will be inherited into the derived class (they are accessible from the derived class). But Private members cannot be accessed from the derived class. (Remember that the memory will be reserved for private as well as protected members for the derived class object) 2.d) Answer the questions (i) to(iv) based on the following code:
(i) Which type of inheritance is depicted by above example? Ans: Multiplel Inheritance. (ii) Identify the member function(s) that cannot be called directly from the objects of class School from the following
Ans: All the above three member function(s) can be called from the objects of class School. (iii) Write name of all member(s) accessible from member functions of class School. Ans:
(iv) If class School was derived privately from class Learner and privately from class Trainer,then name the member function(s)that could be accessed through Objects of class School. Ans:
CBSE Computer Science Solved Revision Tour By Mr. Ravi Kiran ( [email protected] ) |
|