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 ( [email protected] )