It is necessary to understand some of the concepts used extensively in Object Oriented Programming. These include:
- Objects: Objects are the basic run time entities in an object-oriented system. Objects are the instances of a class.
- Classes: Classes are user-defined data types and behave like the built-in types of programming languages.
- Encapsulation: The wrapping up of data and functions into a single unit (called class) is known as Encapsulation. This insulation of the data from direct access by the program is called data hiding or information hiding.
- Data Abstraction: It refers to the act of representing essential features without including the background details or explanations. Classes use the concept of abstraction and are defined as a list of abstract attributes such as size, weight and cost, and functions to operate on these attributes. They encapsulate all the essential properties of the objects that are to be created. The attributes are sometimes called as data members because they hold information. The functions that operate on these data are sometimes called methods/member functions.
- Inheritance: Inheritance is the process by which objects of one class acquire the properties of objects of another class. It supports the concept of hierarchical classification. The concept of inheritance provides the idea of re-usability. This means by deriving a new class from the existing one we can add additional features to the existing class without modifying the base class.
- Polymorphism: Polymorphism means one name, multiple forms. It allows us to have more than one function with the same name in a program. Is also allows overloading of operators so that an operation can exhibit different behaviours in different instances.
- Dynamic Binding: Dynamic binding (a.k.a Late Binding) means that the code associated with a given procedure call is not known until the time of call at run-time. It is associated with polymorphism and inheritance.
- Message Passing: Message passing involves specifying the name of the object, the name of the function (message) and the information to be sent.
No comments:
Post a Comment