CBSE Computer Science - Revision Tour(Solved)
COMPUTER SCIENCE OBJECT ORIENTED PROGEAMING
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:
b) Encapsulation: The wrapping up of data and functions into a single unit (class) is called as encapsulation
CBSE Computer Science Solved Revision Tour By Mr. Ravi Kiran ( email@example.com )