Warning: include_once(../../../headder.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/computer_science1/inheritance4.php on line 16

Warning: include_once(): Failed opening '../../../headder.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/computer_science1/inheritance4.php on line 16

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


Warning: include(../../../ads_330x250_middle.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/computer_science1/inheritance4.php on line 23

Warning: include(): Failed opening '../../../ads_330x250_middle.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/computer_science1/inheritance4.php on line 23

Previous Index Next

DELHI 2006:

2.a) Define Multilevel and Multiple inheritance in context of Object Oriented Programming. Give suitable example to illustrate the same.

2

Ans:
Multilevel Inheritance: When a subclass inherits from a class that itself inherits from another class, it is known as multilevel inheritance.


Eg: (for Multi Level Inheritance)

class A
{
-----
------
}
class B:public class A
{
-----
-----
}
class C:protected B
{
-----
-----
}

Multiple Inheritance: When a sub class inherits from multiple base classes, it is known as multiple inheritance.

Eg: (for Multiple Inheritance)
class A
{
-----
------
}
class B
{
-----
-----
}
class C:public A,protected B
{
-----
-----
}

 

Previous Index Next

CBSE Computer Science Solved Revision Tour By Mr. Ravi Kiran ( [email protected] )



Warning: include(../../../120_60_others.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/computer_science1/inheritance4.php on line 80

Warning: include(): Failed opening '../../../120_60_others.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/computer_science1/inheritance4.php on line 80