Object Oriented Programming
Before starting with java let me tell you what is Object Oriented programming [OOP]?
Languages supporting OOP are C, C++, JAVA
C language is used to clear our basic concepts so as to learn C++ and Java.
C++ Language =Procedural language with Object Oriented extension.
Java Language=It is PURE OBJECT ORIENTED LANGUAGE.
OBJECT ORIENTED LANGUAGE
Objective of this type of approach is to remove the flaws encountered in procedural approach that is in C++.
It treats data as a critical element and does not allows it to move freely around the system. It ties data more closely to the functions that operate on it and prevents it from unintentional modification by other functions or methods. It allows us to decompose a problem in to number entities called objects. Emphasis is on data rather than procedure.
green ones are methods or functions where as brown one is data.
Data is hidden and can't be accessed by external functions.Follows bottom up approach.Objects can communicate with each other through methods. New data and methods can be added whenever necessary.
CLASSES: Collection of objects of similar type.
Data Encapsulation and Data abstraction:
Wrapping up of data and methods into class is encapsulation. Classes uses concept of abstraction which includes hiding of data and showing only essential features.
INHERITANCE: Properties by which objects of one class acquire the properties of objects of another class.
POLYMORPHISM:Ability to take more than one form. e.g Shape can be circle, box, triangle.
Benefits of OOP: Through inheritance we can eliminate redundant code. Saves development time and higher productivity.
Easy to partition the work. Software Complexity can be easily managed. Easy upgradation from small to large systems.
Applications of OOPs:
Real Time systems
Simulation and Modelling
Object oriented databases
Hyper text, Hyper media
Decision support and office automation systems
COPYRIGHT 2009 ALL RIGHTS RESERVED FREECPROGRAMS.COM