Thursday, June 22, 2017

Java-Features of OOP

oop[object oriented programming]
--------------------------------
An  oop consists of the following features

object
class
abstraction
encapsulation
inheritance
polymorphism
message passing
dynamic binding

object
------
It is a real world entity

ex:
 Car,Bike,Pen etc

An object is instance of a class i'e it allocates memory for a class.

class
-----
It is blueprint of an object.
describes obout object
Collection of variables and methods.

abstraction
-----------
The process of providing essential information hiding background details is known as abstraction.


encapsulation
-------------
grouping of variables and methods into a single unit is known
as encapsulation.

inheritance
-----------
The process of deriving properties from a super to a sub class is known as inheritance.

A
|
B

polymorphism
------------
Ploy --many
morphism--forms

Representing same method in many forms(avtar) is known as polymorphism.

Message passing
---------------
Two objects communicating with each other using methods is known as message passing.


dyamic binding
--------------
Binding a method call with a method at runtime is known as dynamic binding.

No comments: