Java - Object Oriented Connection

Java - Object Oriented Connection

A brief introduction to the concept of object oriented programming and its main defining principles.

** This presentation is a part of the Java Tutorial series by RSpeaks **

9ac3406f8ad6e4cea40b869f62d7cecb?s=128

RSpeaks

May 13, 2013
Tweet

Transcript

  1. Java – Object Oriented Connection

  2. Programming Pattern Any program is composed of two main elements

    i.e. code & data. Primarily based on the elements there are two main patterns in which the program could be written – Process Oriented Pattern : is a linear step wise flow of writing a program. One code follows the next in steps. For e.g. C language uses this particular pattern. Object Oriented Pattern : this way of writing programs takes into consideration the data i.e. objects with an interface to it. For e.g. C++ and Java uses this particular pattern. 1
  3. 2 Object Oriented Programming Principles Abstraction Abstraction is a way

    to deal with complexity. It allows breaking down of complex systems into smaller manageable pieces. For e.g. we all drive cars unaware of the internal working parts. Thus we consider the car as a whole object rather than a compilation of different parts.
  4. Object Oriented Programming Principles Encapsulation The process of wrapping up

    data and code into a single entity is termed as encapsulation. This feature makes sure that the data is not directly accessible beyond the bounding entity (data hiding) but is accessible through the code that will access the data instead. 3
  5. Object Oriented Programming Principles Inheritance Deriving properties of one object

    by another object is termed as inheritance. It usually defines a hierarchy classification. Given an object A, if object B inherits object A, it not only copies the behavior and attributes of A but can also define its own special properties. Thus object B is a specialized object. A is called super object and B is called sub object. 4
  6. Object Oriented Programming Principles Polymorphism In its literal terms the

    term polymorphism means having many forms. This feature allows one interface to be used for a given set of common functions i.e. having one interface but multiple methods. For e.g. a dog can smell food, similarly he can also smell a cat and chase it. Though the output for smell is different the action of smelling is common in both. Thus we can define one common interface called smell but with completely different functionality. In non OOP programs this facility is not available, thus for each different action a different interface is required to be implemented. 5
  7. Thank You! 6 contact@rspeaks.in Follow at studystruck www.rspeaks.in