![]() Inheritance provides the facility of re-usability.Also we can categories ‘wild animal’ into ‘tiger’, ‘lion’, ‘leopard’ and ‘pet animal’ into ‘cat’, ‘dog’, ‘bull’. For example, we can categories the ‘animal’ into two categories: ‘wild animal’ and ‘pet animal’.This is based on the hierarchical classification. Inheritance is the process by which one class inherits the properties and method of another class.Private member variable can’t be accessed outside the class while public member can be accessed from anywhere.C++ provides the facility of data hiding by the way of public or private member variable.This fundamental concept is known as the data hiding.The data members cannot be accessed outside class in which it is declared.Data encapsulation provides security on data.“Wrapping up (packing) of data and functions into a single unit-class is known as the data encapsulation.” Class contains abstract data members such as size, weight, height and function to operate on it.We represent thing without going into the background details.Abstraction refers to give the general view. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |