COMPUTER SCIENCE OBJECT ORIENTED PROGEAMING

1998:

1.a) Define the following terms: (i) Inheritance(ii)Encapsulation.

Ans:a) Inheritance: The capability of one class to inherit properties from another class is called as inheritance.The class inheritance, lets you generate a model that is closer to the real world. The class inheritance lets you derive new classes (derived class) from old ones (base class), with the derived class inheriting the properties, including the methods of the old class.

Uses of Inheritance:

i) Capability to express the inheritance relationship which ensures the closeness withthe real world models.
ii) Reusability.
iii)Transitive nature of inheritance.

b) Encapsulation: The wrapping up of data and functions into a single unit (class) is called as encapsulation

The moment which is lost,
         is lost for ever.
    So utilize the time
            properlyā€¯

 

CBSE Computer Science Solved Revision Tour By Mr. Ravi Kiran ( mrkdata@yahoo.com )


Warning: include_once(../../ebooks-footer19.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/coumputer-science/oop3.php on line 83

Warning: include_once(): Failed opening '../../ebooks-footer19.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/coumputer-science/oop3.php on line 83

Warning: include_once(../../../footer19.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/coumputer-science/oop3.php on line 85

Warning: include_once(): Failed opening '../../../footer19.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/coumputer-science/oop3.php on line 85