3) Data
abstraction & Encapsulation :
The wrapping up of data and its functions into a single unit is called Encapsulation.
When using Data Encapsulation, data is not accessed directly,
it is only accessible through the functions present inside the class.
Data Abstraction increases the power of programming
language by creating user defined data types. Data Abstraction also represents
the needed information in the program without presenting the details.
Abstraction refers to the act of
representing essential features without including the background details or
explanation between them.
For example, a class Car would be
made up of an Engine, Gearbox, Steering objects, and many more components. To
build the Car class, one does not need to know how the different components
work internally, but only how to interface with them, i.e., send messages to
them, receive messages from them, and perhaps make the different objects
composing the class interact with each other.
4) Inheritance :
Inheritance is the process of forming a new class from an existing class or base class.
Inheritance is the process of forming a new class from an existing class or base class.
The base clssass is also known as parent class or super class, the new class that is
formed is called derived class.
Derived class is also known as a child class or sub class. Inheritance helps in reducing
the overall code size of the program, which is an important concept in
object-oriented programming.
It is classifieds into different types, they are :
- Single
level inheritance
- Multi - level
inheritance
- Hybrid
inheritance
- Hierarchical
inheritance
5) Polymorphism :
Polymorphism allows routines to use variables of different types at different times. An operator or function can be given different meanings or functions. Polymorphism refers to a single function or multi-functioning operator performing in different ways.
Polymorphism allows routines to use variables of different types at different times. An operator or function can be given different meanings or functions. Polymorphism refers to a single function or multi-functioning operator performing in different ways.
Poly a Greek term ability to take
more than one form. Overloading is one type of Polymorphism. It allows an
object to have different meanings, depending on its context. When an exiting
operator or function begins to operate on new data type, or class, it is
understood to be overloaded.
6) Dynamic
binding :
It contains a concept of Inheritance and Polymorphism.
It contains a concept of Inheritance and Polymorphism.
7) Message
Passing :
It refers to that establishing communication between one place to another.
It refers to that establishing communication between one place to another.
No comments:
Post a Comment