Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

3_Features of Object – Oriented Programming

Uploaded by

rkmaharshi1108
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

3_Features of Object – Oriented Programming

Uploaded by

rkmaharshi1108
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Features of Object – Oriented Programming

● Object-oriented programming is at the core of Java. In fact, all Java programs are object-oriented - this isn’t an
option the way that it is in C++, for example.
● OOP is so integral to Java that you must understand its basic principles before you can write even simple Java
programs.
● Object-oriented programming organizes a program around its data (that is, objects) and a set of well-defined
interfaces to that data.
● An object-oriented program can be characterized as data controlling access to code.
Class
● A class defines the structure and behavior (data and code) that will be shared by a set of objects.
● In object-oriented programming , a class is a template definition of the method s and variable s in a particular
kind of object . Thus, an object is a specific instance of a class; it contains real values instead of variables.
● The class is one of the defining ideas of object-oriented programming.
Object
● Each object of a given class contains the structure and behavior defined by the class, as if it were stamped out
by a mold in the shape of the class.
● For this reason, objects are sometimes referred to as instances of a class.
● Thus, a class is a logical construct; an object has physical reality.
● A class is not an object. (but it’s used to construct them)

Inheritance
● Inheritance in OOP allows to define a general class and later to organize some other classes simply adding some
details with the old class definition.
● This saves work as the special class inherits all the properties of the old general class and as a programmer you
only require the new features.
● This helps in a better data analysis, accurate coding and reduces development time.
● This is the mechanism of organizing and structuring software program.
● Though objects are distinguished from each other by some additional features but there are objects that share
certain things common.
● In object oriented programming classes can inherit some common behavior and state from others.

Abstraction
● Abstraction refers to the act of representing essential features without including the background details or
explanations.
● The process of abstraction in Java is used to hide certain details and only show the essential features of the
object.
● In other words, it deals with the outside view of an object (interface).
Encapsulation
● The wrapping of data and methods into a single unit (a class) is known as encapsulations.
● This is an important programming concept that assists in separating an object's state from its behavior.
● This helps in hiding an object's data describing its state from any further modification by external component.
● In Java there are three different terms used for hiding data constructs and these are public, private and
protected.
● It can also be termed as information hiding that prohibits outsiders in seeing the inside of an object in which
abstraction is implemented.
Polymorphism
● Polymorphism means the ability to take more than one form.
● It describes the ability of the object in belonging to different types with specific behavior of each type.
● So by using this, one object can be treated like another and in this way it can create and define multiple level of
interface.
● Here the programmers need not have to know the exact type of object in advance and this is being
implemented at runtime.

You might also like