Basic
Concepts of OOP
The
Object Oriented Programing has been developed to overcome the drawbacks of
procedural and modular programming. It is widely accepted that object-oriented
programming is the most important and powerful way of creating software.
The
Object-Oriented Programming approach mainly encourages:
• Modularisation: where the program can be decomposed into modules.
•Software re-use: where
a program can be composed from
existing and new modules.
•
Data Abstraction
•
Encapsulation
•
Modularity
•
Inheritance
•
Polymorphism
The
mechanism by which the data and functions are bound together into a single unit
is known as Encapsulation. It
implements abstraction.
Encapsulation
is about binding the data variables and functions together in class. It can
also be called data binding.
Encapsulation
is the most striking feature of a class. The data is not accessible to the
outside world, and only those functions which are wrapped in the class can
access it. These functions provide the interface between the object’s data and
the program.
This encapsulation of data from
direct access by the program is called data hiding or information hiding.
Abstraction
refers to showing only the essential features without revealing background
details. Classes use the concept of abstraction to define a list of abstract
attributes and function which operate on these attributes. They encapsulate all
the essential properties of the object that are to be created. The attributes
are called data members because they hold information. The functions that operate on these data are called methods or member function.
Modularity
is designing a system that is divided into a set of functional units (named
modules) that can be composed into a larger application.
Inheritance
is the technique of building new classes (derived
class) from an existing Class (base
class). The most important advantage of inheritance is code reusability.
Polymorphism
is the ability of a message or function to be displayed in more than one form.
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.