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 DELHI 2008: 2.d) Answer the questions (i) to(iv) based on the following code :
(i) Which type of Inheritance is shown in the above example? Ans: Hierarchical Inheritance. Since the sub classes are derived from a single base class(Dolls). (ii) How many bytes will be required by an object of the class ElectronicDolls ? Ans: 41 Bytes (Explonation: The memory will be reserved as follows:
iii) Write name of all data members accessible
from member function of the class SoftDolls. Ans: Dolls::Price,
SoftDolls:: SDName,
SoftDolls::Weight (iv) Write name of member functions accessible an object of the class ElectronicDolls? Ans: ElectronicDolls::EDInput( ), ElectronicDolls::EDShow( ),
Dolls::DInput( ), Dolls::DShow( ) OUTSIDE DELHI 2008: 2.d) Answer the questions (i) to(iv) based on the following code :
(i) Which type of Inheritance is shown in the above example? Ans: Hierarchical Inheritance. Since the sub classes are derived from a single base class(Dolls). (ii) How many bytes will be required by an object of the class SoftToys ? Ans: 33 Bytes(Explonation: The memory will be reserved as follows:
CBSE Computer Science Solved Revision Tour By Mr. Ravi Kiran ( mrkdata@yahoo.com ) |