Thursday, January 21, 2016

Object oriented programming

Object oriented programming is method by which you can program using classes and objects.Object is entity existing in real world.Some concepts of object oriented programming are as follows:
  1. Object
  2. Class
  3. Inheritance
  4. Encapsulation
  5. Abstraction
  6. polymorphism 
Object: Object is entity in existing real world with some properties. 

Class : In real world a class is an entity from which the object are created.Every car was constructed from same set of defined procedures,so contains same components. A class is an entity from where object are created.Class is a collection of object of similar type.

Inheritance: It is quality of class to acquire all the qualities and properties of parent class.It provides code re-usability.

Encapsulation: Process of binding code and data together in a single unit is know as encapsulation.Is is used to hide the implementation from the end user.

Abstraction: It refer to quality of hiding internal details and showing functionality.In is used to implement interface in java.

Polymorphism: It refers to the objects and methods having same name but different behavior.It also refer to methods having different parameters. 



No comments:

Post a Comment